Archiving the Git Master Branch | Task

Ole Ersoy
Sep - 27  -  1 min

Scenario

We have a Github project that we want to upgrade to a brand new set of files. So we want to create an archive1 branch, in addition to deleting existing files and committing the new ones.

Approach

Create and push the archive1 branch.

git checkout -b archive1
git commit -m "New Archive Branch"
git push origin archive1

You should now see the archive1 branch on Github.

Delete the existing project files that will be replaced, commit, and push (VSCode is a good option for this.).

Copy over the new projet files, add, commit, and push.

It's a good idea to verify that tests are still running as expected.