Git Workflow
Last updated
Was this helpful?
Was this helpful?
git remote add upstream https://github.com/CUBRID/cubrid.git
git remote -v
#====
# origin http://github.com/hgryoo/cubrid (fetch)
# origin http://github.com/hgryoo/cubrid (push)
# upstream http://github.com/cubrid/cubrid (fetch)
# upstream http://github.com/cubrid/cubrid (push)
git fetch upstream
# Get a new branch to work on, create a branch from upstream!
# To prevent being reflected incorrectly by git push
# The two commands below must always be executed together.
git checkout -b CBRD-55555_my_work upstream/develop
git push -u origin CBRD-55555_my_work
# Add and commit your changes during your work
git add src/you/code
git commit -m 'code change'
# NOTE: Always write the remote name and branch name to prevent
# uploading to wrong remote
# Push your changes to your remote repository
git push origin CBRD-55555_my_work
# When you want to get and sync with upstream's change
git fetch upstream
git merge upstream/develop