[GIT command] Branch

Here are some git commands concerning the manipulation of branchs.

# List all the remote branchs

# Checkout a remote branch

$ git checkout -b my_local_branch origin/my_remote_branch

# Delete a local branch

$ git checkout -d my_local_branch



[GIT command] Compare two branchs

# git branch
* master

Git diff command allows to list the different files between the two branchs
# git diff –name-status master..another_branch

[Git] Git diff without comparaison file mode

Issue when execute git diff command on a file and got :

diff --git a/your_file b/your_file
old mode 100644
new mode 100755

If you see this, it is because the permissions of your_file has changed.
For information, the unix file permission mode(644=rw_r__r__ which means read and write for user, only read for group and only read for others, the same for 755=rwxrw_rw_, x for executable).

To disable the comparaison of file mode, the command to execute :

git config core.filemode false