skynyrd
11/1/2016 - 7:26 AM

Git hints

Git hints

After cloning repo with submodules, to fill submodules:

git submodule init 
git submodule update

To update all submodules with latest commit:

git submodule foreach git pull origin master

Change last commit message:

$ git commit -amend

or

$ git commit -amend -m "new message"

Copy message of last commit to current one:

$ git commit -amend --no-edit

Delete last commits, WARNING: Removes them forever!

git reset --hard commitId
git push origin HEAD --force