git pull --rebase
git status
git add filename
git diff --cached
git commit -m "added file x jira 6523"
git commit --amend
git reset HEAD~
git show
git reset --hard origin/master
git checkout -- puppet-modules/Puppetfile
git reflog
git fetch --all
cat .git/FETCH_HEAD
From time to time people perform multiple changes to a file so you can't perform a git blame. But in my case i needed to find when the first changed happed, bellow you will find a few ways of doing this.
git show --stat --oneline 42516364da7f283aa2e8851d335c5762cfd4d62c..HEAD
git log --stat
git-bisect
git show 8e1b479e71a438e57e5c884437ed4bddc218ec57 -- puppet-modules-eis/ | git apply -R
git gerrit init
git push origin HEAD:refs/for/master
I think this is the default url, but overall you should be able to find the commit-msg in gerrit somewhere. Ask your admin
curl -Lo .git/hooks/commit-msg http://gerrit.domain.se/tools/hooks/commit-msg
chmod +x .git/hooks/commit-msg
ssh selngerrit gerrit review ${SHA1} --message "Blaha"
SHA1=git log -1 --pretty=format:%H HEAD
Where ~5 is how many commits you want to go back and put together.
git rebase -i HEAD~5