...
To start working on the project, your’e going to want to fork our central repository. Forking is the process of making a copy of a repo and storing it on your own github. To do this, head over to https://github.com/UWARG/ZeroPilot-SW and in the top right, click the fork button.
...
Ok sweet, so you’ve got the repo. Now how to do actual work ? here’s the process.
1. Make a branch off of the devel branch. The devel branch is our default branch and you shouldn’t modify it locally. Keep it clean so that you never have problems syncing with our central repo. The name of the branch you create can be something relevant to the work your’e trying to do, but it doesen’t matter. Branch names are only a you thing and never show up again once your code gets merged. For this example, supose I’m working auto takeoff.
...
To make my branch, I’d run
Code Block |
---|
git checkout -b autoTakeOff |
2. In this branch, do anything you want. Make commits, stash, move around, whatever. Once you finish your work and your’e ready for review, make sure your stuff is committed, and run
Code Block |
---|
git push origin <your branch name> git push origin autoTakeOff ((autoTakeOff, in my case) |
That pushes up your changes to your remote repo. The next step is to start a pull request (PR, for short).
3. To make the PR, go over to your github fork. YOu’l You’l see a “pull request” button right over your repo:
...
As a 1 time step, you’l want to tell your local rep repo about the central repo. Right now, it really only knows about “origin”, which is the copy of the repo that lives on your own github profile. To tell git about the central repo, you’l need to add a remote repo. You can do that by running
...
Sweet, so now you can get stuff from the remote repo. Here are the steps to take to update your local stuff:
1. Inside your local repo, checkout the devel branch and run
Code Block |
---|
git fetch upstream |
That brings all the newest central repo files into a local buffer. At this point though, no files have been updated.
...