Pycharm git update - njcuk9999/apero-drs GitHub Wiki
Guide on using PyCharm to update/merge with master
Contents
Introduction
This assumes you have pycharm installed and have downloaded the DRS and it is connected to git.
Step by step guide (assuming no conflicts)
I'll use the dev branch as an example throughout
1) Checkout your branch
- In command line this is the same as:
git checkout dev
2) Make sure all changes are committed to github (i.e. commit and push)
- In command line this is the same as:
git commit -m "This is my change"
git push origin dev
3) Checkout master branch
- In command line this is the same as:
git checkout master
https://github.com/njcuk9999/spirou_py3/blob/master/INTROOT/documentation/wiki/pycharm-git-update-3.png https://github.com/njcuk9999/spirou_py3/blob/master/INTROOT/documentation/wiki/pycharm-git-update-3b.png
4) update master branch from github
- In command line this is the same as:
git pull origin master
https://github.com/njcuk9999/spirou_py3/blob/master/INTROOT/documentation/wiki/pycharm-git-update-4.png https://github.com/njcuk9999/spirou_py3/blob/master/INTROOT/documentation/wiki/pycharm-git-update-4b.png
5) check out your branch
- same as step (1)
6) Merge "master" into current
- This is where any conflict will have to be dealt with (but PyCharm makes this easy -- see below)
7) Make sure all changes are commited to github
- In command line this is the same as:
git push origin dev
Conflicts
In step 6 if there were conflicts a window will pop up Files Merged with Conflicts. This is where one has to decide which to accept from which branch.
NOTE: Do not abort this as it will add lots of weird lines to the confliciting codes!!!
Here is some good information about resolving conflicts in pycharm: https://www.jetbrains.com/help/pycharm/resolving-conflicts.html
https://github.com/njcuk9999/spirou_py3/blob/master/INTROOT/documentation/wiki/pycharm-git-update-conflict1.png https://github.com/njcuk9999/spirou_py3/blob/master/INTROOT/documentation/wiki/pycharm-git-update-conflict2.png