Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

There are a number of ways how to achieve this using Git commands:

  • Some users might wish to cherry-pick individual commits from a test Git repository which is considered by the below example.
  • Some users might prefer to copy the complete test repository to a prod repository using branches
  • Some users might prefer to simplify rollout by use of a single repository and therefore will skip this step.

Code Block
languagepowershell
titleExample how to pull changes to a local Git repository
linenumberstrue
# add the test repo as a remote repository 
git remote add oldrepo git@github.com:sos-berlin/js7-demo-inventory-rollout-test.git

# get the test repo commits
git remote update

# examine the whole tree
git log --all --oneline --graph --decorate

# copy/cherry-pick the commits from the test repo into your local prod repo
git cherry-pick <commit-hash>

# check local prod repo
git log

# push changes to remote prod repo
git push origin master

# remove the reference to the test repo
git remote remove oldrepo

...