1. Clone your own configuration library:
git clone ssh://{name@}ip:port/path
2. Copy the hooks script to the local configuration repository.git/hooks/
scp -P 29418 -p ip:/hooks/commit-msg localpath/.git/hooks/
These two steps only need to be run once at the beginning, unless the local configuration repository needs to be rebuilt
3. Switch to branch:
git checkout branch name (you can use git branch to view the branch name)
4. Synchronize the data of the same branch of the remote server:
git pull --rebase
5. Work area additions, deletions and modifications
6. git operations add and delete submissions to the local configuration repository:
git add/git rm/git commit
7. Merge with the same branch content of the remote server before submitting to gerrit:
git fetch origin
git rebase origin/branch name
8. Submit
If there is no conflict, submit directly:
git push origin HEAD:refs/for/branch name
If there is a conflict, resolve the conflict
git add -u
git rebase --continue, (must use --continue, otherwise it will open a new branch no branch)
Then use git push origin HEAD:refs/for/branch name