git still confuses me so no worries. I had the PR ready to trigger but @PrzemoF beat me to it
@felixlee868 in regards to github...
the way I do it:
By the way, I cheat and use gitkraken which is a git Graphical Users Interface but nevertheless, i've documented it on the github wiki page how to submit a PR. I also use a browser extension called Refined Github (link) that makes using github even better
- I fork a project through github (i click the fork button)
- I copy the cloned URL
- Then in my local machine I open a terminal and type:
git clone <pasted-cloned-url>
- Then I add the FreeCAD/FreeCAD repo as an upstream 'remote':
git remote add upstream https://github.com/FreeCAD/FreeCAD.git
- I double check that the configurations are correct with: git remote -v
Result should look like:
Code: Select all
origin https://github.com/GITHUB_USERNAME/FreeCAD.git (fetch) origin https://github.com/GITHUB_USERNAME/FreeCAD.git (push) upstream https://github.com/FreeCAD/FreeCAD.git (fetch) upstream https://github.com/FreeCAD/FreeCAD.git (push)
- Then create and checkout a new branch:
git checkout -b myNewBranch
- Make your modifications to the source code
- git add .
- git commit -m"Short and sweet git commit message"
- Just in case the FreeCAD master has been updated run git fetch && git rebase master
- Push your branch to Github: git push origin
- Go to your browser and refresh your github repository. There should be an green curved arrow icon in the top right of the page notifying you that there is a branch and it can be made in to PR. Click this button and make sure that you are submitting the PR to FreeCAD/FreeCAD (not to your own repository!).