If I'm working locally,and I need to get the latest code on remote master branch, one way is to switch to local master and do git pull . However, this fetches only the changes after the HEAD of local master. If the remote master is changed in such a way that, underlying commits before local HEAD are also modified, how can I get them, without needing to do a whole git clone again?