Assume the following history exists and the current branch is "topic":
A---B---C topic
/
D---E---F---G master
After running any of following commands :-
git rebase master
git rebase master topic
A'--B'--C' topic
/
D---E---F---G master
Git
with one Gerrit
speciality: The target branch is prefixed with refs/for/
git push origin HEAD:refs/for/<branch-name>
git push origin HEAD:refs/for/master
same as git push origin HEAD:refs/for/refs/heads/master
Git
(bypassing code review):git push origin HEAD:<branch-name>
git push origin HEAD:master
same as git push origin HEAD:refs/heads/master
gerrit
with commit-msg-hook
remote
git branches
for making local changes.Example: Create gerrit
change-list(CL) for BWVONE-19
from master
:-
git checkout master
git checkout -b BWVONE-19
git pull origin master --rebase
<Do some work and commit changes>
git push -vv ssh://<gerrit-username><repo-path>/<repo-name> HEAD:refs/for/master
Install git-lfs
on machine :-
brew install git-lfs
git lfs install
git lfs track "*.psd"
git add .gitattributes
git add file.psd
git commit -m "Add design file"
git push origin master