Git/push

from HTYP, the free directory anyone can edit if they can prove to me that they're not a spambot
< Git
Jump to navigation Jump to search
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

Action: updates remote refs using local refs, while sending objects necessary to complete the given refs

Rules

You can't push to a repository that has been edited elsewhere; you have to pull first, which updates (synchronizes) your local repository from the remote. (This does not remove any files, but may modify files if the same files have been updated on the remote.) Once your local is synchronized with the remote, you can then push it back up.

Examples

  • git push <remote server> <branch to push>
  • git push -u -v <remote server> <branch to push>
    • This version is more verbose; not actually sure what -u does.

Remote server is any server-alias you have set up; "origin" seems to be a default. Branch is typically "master".

Links

Reference