Here is my reminder for my git use :

Git config – set your name / email

git config —global user.name « Nicolas Dagieu »

git config —global user.email « n.dagieu@virtualopensystems.com« 

git diff <file> show the changes from the last commit (git diff <commit> , to show changes from last commit)

git diff <commit>..<commit> to compare changes between two commits

git fetch <remote> <branch>

Import from another repo, allow to compare and to merge between own repo and remote.

git fetch origin master (fetch the « origin » remote with « master » branch)

git log master..origin/master (see differences between our master branch … and the remote one).

we can do a merge when we want to merge our repo to the fetched remote/branch. (git merge origin/master)

git pull <remote> <branch>

Do a fetch followed by a merge.

git pull –rebase <remote> (bypass the 3-way-merge, do an automatic merge)

git cherry-pick <commit> (to pick a commit from remote branch to local actual branch), if a conflict happend, do a git status to see conflict files, git diff on theses files to see changes and edit the file to fit your needs finally a git commit -as will commit the result and the pick is done.