develop branch and are up to date with what is on the remote git/TFS server
git checkout develop
git fetch
git status
You should see "Your branch is up-to-date with 'origin/develop'". Additionally, there should be no modified file or staged files. Untracked files are allowed so long as you are sure they are not needed to be recorded in the project repository.
If you are not up to date, you may need to do a git pull and possibly resolve conflicts, pushing your result back to the remote git/TFS server.
develop into release-X.Y.Z where X.Y.Z is the to-be-released version number
git checkout -b release-X.Y.Zdevelop and push develop to the remote origin
git checkout develop
git merge --no-ff release-X.Y.Z
Resolve any conflicts.
git push origin develop
Resolve any conflicts.
\\SERVER in Explorer. Right-click on the NVCC directory and select "Send to" -> "Compressed (zip) folder". After the "Compressing..." dialog finishes, change the resulting filename NVCC.zip to NVCC_N.N.N_YYYYMMDD where N.N.N is the previous version number and YYYYMMDD is the current date in four-digit year, month, day format (without delimiters). (e.g. NVCC_1.6.2_20160916.zip)git checkout release-X.Y.Zmaster
git checkout master
git merge --no-ff release-X.Y.Z
There should not be any conflicts with this.
vX.Y.Z. Give it the commit message "Version X.Y.Z"
git tag -a -m "Version X.Y.Z" vX.Y.Zgit push --tags origin mastergit checkout developgit branch -d release-X.Y.Zmaster branch of the repository
git checkout mastergit fetch --tags
git status
You should see "Your branch is up-to-date with 'origin/master'". Additionally, there should be no modified file or staged files. Untracked files are allowed so long as you are sure they are not needed to be recorded in the project repository.
Make sure you have the most recent updates from the central repository
git fetch --tagsDetermine the tag corresponding to the version you want to rollback to. A list of all the tagged versions can be gotten with
git tag --list -nor more detail (including tag date and message) with
git for-each-ref --format="%(refname:short) %(taggerdate) %(subject)" refs/tagsCheckout the appropriate tag based on its short tag name
git checkout vX.Y.ZYou will get a message like
Note: checking out 'v1.6.0'.
You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by performing another checkout.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -b with the checkout command again. Example:
git checkout -b <new-branch-name>
HEAD is now at 12ade2d... Merge branch 'release-1.6.0'
with tags, SHA's and messages appropriate to your release
Deployment
Return your working directory to a usable state (develop or whatever branch you were working on)
git checkout developA hotfix differs from a regular release in that it is an urgent, typically small change to the tool. It specifically is not to include any of the development that has been done (and merged into develop) since the last release. Typically, the decision that a hotfix is needed is made even before any code that will go into the hotfix is written. A hotfix starts from master, and its changes will go both into master for production and develop so that they are not lost in later version.
master branch of the repository
git checkout mastergit fetch --tags
git status
You should see "Your branch is up-to-date with 'origin/master'". If you are behind origin/master, and can fast-forward, do so: git pull. Additionally, there should be no modified file or staged files. Untracked files are allowed so long as you are sure they are not needed to be recorded in the project repository.
master into hotfix-X.Y.Z where X.Y.Z is the to-be-released version number. Typically, this will just be an increment of Z
git checkout -b hotfix-X.Y.Zdevelop and push develop to the remote origin
git checkout develop
git merge --no-ff hotfix-X.Y.Z
Resolve any conflicts.
git push origin develop
Resolve any conflicts.
git checkout hotfix-X.Y.Zmaster
git checkout master
git merge --no-ff hotfix-X.Y.Z
There should not be any conflicts with this.
vX.Y.Z. Give it the commit message "Version X.Y.Z"
git tag -a -m "Version X.Y.Z" vX.Y.Zgit push --tags origin mastergit checkout developgit branch -d hotfix-X.Y.Z