Just another programmer's site

Category: git

Git: checkout from remote branch

git fetch

git checkout -b {branch_name} origin/{branch_name}

Git: ignore file permission change

By default, git detects file permission change in workspace.

To ignore this, exec the following command.


git config core.filemode false


Git: merge

The following push command is to push “master” branch to remote “origin” repository.

git push origin master


But this merge command is to merge  master branch of “local” repository.

git merge origin/master


It’s troublesom. 🙁

To avoid mistakes, I remember “merge command does’t see remote repositoy”.

Before git merge, we have to fetch diff data from remote repository.

git fetch

git merge origin/master


git pull origin master command is equals to above two commands.

© 2018

Theme by Anders NorenUp ↑