Developing FreeCAD with GitKraken: Difference between revisions

From FreeCAD Documentation
(added screenshot)
(Added Rebasing)
Line 2: Line 2:


* Browser https://github.com/FreeCAD/FreeCAD
* Browser https://github.com/FreeCAD/FreeCAD
* Click the Fork button. This will clone the FreeCAD/FreeCAD repo to your own. The URL to access you fork of FreeCAD is https://github.com/GITUBUSERNAME/FreeCAD.git
* Click the Fork button. This will clone the FreeCAD/FreeCAD repo to your own. The URL to access you fork of FreeCAD is
{{Code|https://github.com/GITUBUSERNAME/FreeCAD.git}}
* Open GitKraken and go to '''File > Clone Repo'''
* Open GitKraken and go to '''File > Clone Repo'''
[[File:GitKraken-Clone-Repo-dialogue.png]]
[[File:GitKraken-Clone-Repo-dialogue.png]]
Line 18: Line 19:
upstream https://github.com/FreeCAD/FreeCAD.git (push)}}
upstream https://github.com/FreeCAD/FreeCAD.git (push)}}
* switch back to the GUI
* switch back to the GUI

.....add some more steps here....
.....add some more steps here....
<hr />


*Orientation:
*Orientation:
Line 28: Line 29:
*** Remote Origin = Fork of FreeCAD/FreeCAD (should look something like: github.com/YourGitHubUsername/FreeCAD) <= Symbolized as '''Red''' in Screenshot
*** Remote Origin = Fork of FreeCAD/FreeCAD (should look something like: github.com/YourGitHubUsername/FreeCAD) <= Symbolized as '''Red''' in Screenshot
[[File:GitKraken-Main-Screen-sm.jpg]]
[[File:GitKraken-Main-Screen-sm.jpg]]

<hr />

* Rebasing
** Checkout the Local Master branch by double clicking on it (this is the equivalent of typing '''git branch master''' in the terminal)
** Move the mouse to the where latest Upstream commit is, right click mouse and choose '''Rebase master on upstream/master''' (this will pull down the Upstream changes in to your Local master)
** Move the mouse and press the '''Push''' button (This pushes from your 'Local master' to 'Remote Origin master')
Now all your repos are in sync!
[[File:GitKraken-Rebasing.gif]]


[[Category:Development]]
[[Category:Development]]

Revision as of 21:00, 23 July 2017

Template:UnderConstruction

https://github.com/GITUBUSERNAME/FreeCAD.git
  • Open GitKraken and go to File > Clone Repo

  • GitKraken will now git clone your repository
    • Now an important point: Please read the different between origin vs. upstream remote repos. Essentially your fork of FreeCAD is the origin repo. The official FreeCAD git repo FreeCAD/FreeCAD is your upstream. You now need to set the upstream repo as FreeCAD.
  • Go to File > Open Terminal
  • Enter the following to set up your upstream remote repo
git remote add upstream https://github.com/YOURGITUHUBUSERNAME/FreeCAD.git
  • Now check what remote branches you have set by typing:
git remote -v
  • you should see something like this in the terminal:
origin	https://github.com/foobar/FreeCAD (fetch)
origin	https://github.com/foobar/FreeCAD (push)
upstream	https://github.com/FreeCAD/FreeCAD.git (fetch)
upstream	https://github.com/FreeCAD/FreeCAD.git (push)
  • switch back to the GUI

.....add some more steps here....


  • Orientation:
    • Local = local machine
      • Local master = your local copy FreeCAD <= symbolized as Blue in Screenshot)
    • Remote = Remote GitHub repos
      • Remote Upstream = Official FreeCAD repo (AKA FreeCAD/FreeCAD) <= Symbolized as Green in Screenshot
      • Remote Origin = Fork of FreeCAD/FreeCAD (should look something like: github.com/YourGitHubUsername/FreeCAD) <= Symbolized as Red in Screenshot


  • Rebasing
    • Checkout the Local Master branch by double clicking on it (this is the equivalent of typing git branch master in the terminal)
    • Move the mouse to the where latest Upstream commit is, right click mouse and choose Rebase master on upstream/master (this will pull down the Upstream changes in to your Local master)
    • Move the mouse and press the Push button (This pushes from your 'Local master' to 'Remote Origin master')

Now all your repos are in sync!