Useful git commands or actions

Allos Overwrite

Ref. Ignoring “Your local changes to the following files would be overwritten by merge” on pull

git checkout HEAD^ file/to/overwrite
git pull

Ignoring versioned files

To start ignoring a file

$ git update-index --assume-unchanged path/to/file.txt

To start track again

$ git update-index --no-assume-unchanged path/to/file.txt


You can pull one or all public submodules with git using the following commands :

Pull One
git submodule update --init [PATH TO SUBMODULE]
Ex. git submodule update --init c:/wamp/www/site/subfolder

Pull All
git submodule update –init,

more coming soon..

One thought on “Useful git commands or actions

Leave a Reply