Skip to content
bjunix edited this page Jan 14, 2013 · 12 revisions

git fetch/merge not git pull

Its considered best practice to do a git fetch followed by a git merge instead of a git pull when working in a team.

http://longair.net/blog/2009/04/16/git-fetch-and-merge/

Some useful Git commands

When directories are removed from origin and you do a fetch/merge you still may end up with those dirs in your working directory. Unfortunately git status is saying nothing to commit (working directory clean) and act as if everything is fine. To clean up your working directory run:

$ #dry run
$ git clean -n -d
$ #actual cleanup
$ git clean -f -d

http://gitready.com/beginner/2009/01/16/cleaning-up-untracked-files.html

Clone this wiki locally