Skip to content

How to use command line git to deliver into install packaging staging cupids branch

Joe-Winchester edited this page May 7, 2019 · 2 revisions

Install git client - A good site to start from is https://www.atlassian.com/git/tutorials/install-git

Once git is installed you should be able to type
git --version
and see the version of the client you have on your PC/Mac.

The next step is to clone the github.com/zowe/install-packaging repository onto your local file system

CD to a folder where you want to clone the repository into, e.g. cd /Users/Joe/zowe/repos

Clone the git repository issuing the command
git clone [email protected]:zowe/zowe-install-packaging.git

When this has occurred you will have created a directory zowe-install-packaging on your local file system. CD into this.

git branch
will show the branch you are working with. By default this will be master.
Switch to the stagings/cupids branch by issuing git checkout stagings/cupids
and issue git branch
to confirm the switch has occurred. git pull

When delivering changes back they should not be put directly into staging/cupids as this is the effective trunk for the cupids work, so a new branch should be created locally, e.g
git checkout -b Joe_Cupids
Any changes that you make with your local files in zowe-install-packaging directory will be held locally on your PC. To get these set back to the github.com/zowe repository you should do a git push. The first time you do this you will need to name the remote repository git push --set-upstream origin Joe_Cupids

Changes to any local files will not be committed by default and need to be staged for commit. You can see the files you have modified using git status. Files in red are modified but not staged for delivery. To add files to be committed use git add . for all files, or a specific file or path. git status will now show them in green as ready to be committed.

git commit -s -m "Signed off by Bob Fisher" is needed to commit these to the branch (the signed off is required by zowe to make sure that work is signed off by the developer (where Bob Fisher is fictious - use your real name here)

git push will then push changes from the local branch to the remote branch. From there a pull request can be made.

Clone this wiki locally