Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.


Info
titleCheat sheet

github-git-cheat-sheet.pdf


Info
titleUseful notes
  • Git's ability to communicate with remote repositories (in your case, Bitbucket is the remote repository) is the foundation of every Git-based collaboration workflow.
  • Git's collaboration model gives every developer their own copy of the repository, complete with its own local history and branch structure. Users typically need to share a series of commits rather than a single changeset. Instead of committing a changeset from a working copy to the central repository, Git lets you share entire branches between repositories.

Git branchingImage Modified

  • You manage connections with other repositories and publish local history by "pushing" branches to other repositories. You see what others have contributed by "pulling" branches into your local repository.


  1. Create a GitHub account
  2. Download GitHub console
  3. If you want the GUI, download it from here

...

Git add does more than add files to the local repository, to moves modified from modified state to the staged state, once in the staged state, they still need to be committed using git commit.  If you are sure the commit is definite, the execute a git push to push the committed changes up to git.

Git add staging

Git commit

Takes the staged snapshot and commits it to the project history.  The changes are still only on your local system not on the origin server.  To make the changes present on the origin server the changes must be pushed to the origin server.

Git commitImage Modified

Git push <git server> <project branch>

The git push command consists of the server id and the branch, so the typical command is git push origin master, where origin is the home server and master the main branch.

Git push

Git pull <options>

git pull --all command to pull all the changes from Bitbucket.  In more complex branching workflows, pulling and merging all changes might not be appropriate .

The git pull command merges the file from your remote repository (origin) into your local repository with a single command.

Origin to LocalImage Added

Working with stuff that's NOT on a local computer

...