Git Commands

Here are the git commands I use most often (I use git GUI so I don’t usually type the commands git add, git commit, & git push to move files):

  • git branch – tells you what branch you are currently in
  • git checkout [branch] – switch branches
  • git merge [branch] – bring in the code from the named branch, into the current branch
  • git pull [repository] [branch] – pull my files
  • git push [repository] [branch] – push my files
  • git stash – store local changes (usually when there is a merge conflict)
  • git stash apply (retrieve the stashed local changes)

for me:
[repository] = origin
[branch] = master and dev