Upstream --> Branch from remote(Product) repo.
For Project delivery, we added upstream for this repo.
https://stefanbauer.me/articles/how-to-keep-your-git-fork-up-to-date
- Add remote upstream for this repo,
$ git remote add upstream [email protected]:example/example.git
- Check your upstream is available for the repo
$ git remote -v
origin [email protected]:example/spark-example.git (fetch)
origin [email protected]:example/spark-example.git (push)
upstream [email protected]:example/example.git (fetch)
upstream [email protected]:example/example.git (push)
- Get upto date with upstream
$ git fetch upstream
- Merge Local master branch with Upstream master branch,
$ git merge upstream/master master
Always rebase with the master branch,
$ git checkout release/2020_Q4_3.1
$ git rebase upstream/release/2020/Q4
Add this alias in ~/.gitconfig
addtag = "!f() { git tag -l | xargs git tag -d && git fetch -p && git tag $1; } ; f"
ptags = push origin --tags
dtags = "!f() { git tag -d $1 && git push origin :refs/tags/$1; } ; f"
git addtag v3.1.67
git ptags v3.1.67
Example:
git commit -m "Customer: commit the changes"