apu84
3/30/2020 - 10:33 AM

GIT

git fetch origin release/3.1
-- this will link FETCH_HEAD to release/3.1, now merge it to 3.2
git checkout release/3.2
git merge FETCH_HEAD
# Discard all local changes to all files permanently
$ git reset --hard

# Unstage staged file
$ git restore --staged src/test/java/com/escenic/webservice/servlet/SearchResultPostProcessorTestCase.java

# Delete the most recent commit:
git reset --hard HEAD~1

# Delete the most recent commit, without destroying the work you've done:
git reset --soft HEAD~1
git checkout <old_name>

git branch -m <new_name>

# At this point, you have renamed the local branch.
# If you’ve already pushed the <old_name> branch to the remote repository , perform the next steps to rename the remote branch.

git push origin -u <new_name>

git push origin --delete <old_name>
# Counts only the commits made in the branch
# Assuming branch is made from release/7.14
git rev-list --count --no-merges release/7.14..
## Mitigate nexus error
## Failed to transfer file: https://nexus.stibodx.cloud/repository/maven-releases/com/escenic/core/core/7.15.0-22/core-7.15.0-22.pom. Return code is: 400, ReasonPhrase: Repository does not allow updating assets: maven-releases. 

$ git checkout release/7.12
$ git pull --rebase
$ git tag --annotate --message 'Manually adding tag since Yoda failed in-build' v7.12.3-3
$ git push --tags