Git push only for bare repositories?

Read the warning carefully. The new default prohibition is only on pushing to the currently checked out branch in a non-bare repository. It is perfectly OK to push to any other branch in a non-bare repository. The reason for this is that the push process has no direct access to the working tree so the … Read more

Github remote push pack size exceeded

The packsize limit does not affect git protocol commands (your push). From git-config under pack.packSizeLimit: The maximum size of a pack. This setting only affects packing to a file when repacking, i.e. the git:// protocol is unaffected. When executing a push git will always create exactly one pack no matter the size! To fix this … Read more

Remote origin already exists on ‘git push’ to a new repository

You are getting this error because “origin” is not available. “origin” is a convention not part of the command. “origin” is the local name of the remote repository. For example you could also write: git remote add myorigin [email protected]:myname/oldrep.git git remote add testtest [email protected]:myname/oldrep.git See the manual: http://www.kernel.org/pub/software/scm/git/docs/git-remote.html To remove a remote repository you enter: … Read more

What are the differences between “git commit” and “git push”?

Basically git commit “records changes to the repository” while git push “updates remote refs along with associated objects“. So the first one is used in connection with your local repository, while the latter one is used to interact with a remote repository. Here is a nice picture from Oliver Steele, that explains the git model … Read more