cleanup
parent
ef969cf2ef
commit
797e066a6a
|
@ -18,16 +18,18 @@ If you want more information about git commands, you can read [this free book](h
|
||||||
|
|
||||||
You have to follow these steps only the first time you fork Cxbx-Reloaded:
|
You have to follow these steps only the first time you fork Cxbx-Reloaded:
|
||||||
1. Fork mainline Cxbx-Reloaded repository on GitHub by clicking the "Fork" button (upper-right) and clone it to a local folder.
|
1. Fork mainline Cxbx-Reloaded repository on GitHub by clicking the "Fork" button (upper-right) and clone it to a local folder.
|
||||||
2. Open a git shell in the root folder of your cloned repository and paste this command (without quotes): "`git remote add upstream https://github.com/Cxbx-Reloaded/Cxbx-Reloaded.git`".
|
2. Open a git shell in the root folder of your cloned repository and run this command: `git remote add upstream https://github.com/Cxbx-Reloaded/Cxbx-Reloaded.git`
|
||||||
3. Then type (without quotes) "`git remote -v`". If you see two "`origin`" and two "`upstream`";
|
3. Run `git remote -v`. If you see two "`origin`" and two "`upstream`";
|
||||||
Congratulations, you have completed the first-time setup!
|
Congratulations, you have completed the first-time setup!
|
||||||
|
|
||||||
### Keep your fork updated
|
### Keep your fork updated
|
||||||
|
|
||||||
You have to follow these steps anytime you want to update your forked Cxbx-Reloaded repository:
|
You have to follow these steps anytime you want to update your forked Cxbx-Reloaded repository:
|
||||||
1. Open a git shell in the root folder of your cloned repository and paste these commands (without quotes): "`git fetch upstream`" and then "`git checkout master`".
|
1. Open a git shell in the root folder of your cloned repository and run these commands:
|
||||||
2. Then type (without quotes): "`git rebase -i upstream/master`" and check if every commit looks good.
|
1. `git fetch upstream`
|
||||||
3. You may need to run (without quotes): "`git push origin master --force`" to update your repository on GitHub.
|
2. `git checkout master`
|
||||||
|
2. Then run `git rebase -i upstream/master` and check if every commit looks good.
|
||||||
|
3. You may need to run `git push origin master --force` to update your repository on GitHub.
|
||||||
|
|
||||||
### Create a branch for your new contribution
|
### Create a branch for your new contribution
|
||||||
|
|
||||||
|
@ -36,8 +38,11 @@ You must keep the master branch of your forked repository clean, and instead cre
|
||||||
Before creating a branch, MAKE SURE YOUR FORK IS UP-TO-DATE!
|
Before creating a branch, MAKE SURE YOUR FORK IS UP-TO-DATE!
|
||||||
|
|
||||||
Change "name_of_new_branch" to something meaningful like "fixing-issue-X".
|
Change "name_of_new_branch" to something meaningful like "fixing-issue-X".
|
||||||
1. Create a branch using this command (without quotes): "`git checkout -b name_of_new_branch`".
|
1. Create a branch using this command: `git checkout -b name_of_new_branch`
|
||||||
2. Switch to your new branch with (without quotes): "`git checkout name_of_new_branch`".
|
2. Switch to your new branch with: `git checkout name_of_new_branch`
|
||||||
3. Push your new branch on GitHub running (without quotes): "`git push origin name_of_new_branch`".
|
3. Push your new branch on GitHub running: `git push origin name_of_new_branch`
|
||||||
4. Now do your work. Once done send a Pull Request directly from GitHub (go to your branch and click "Pull Request").
|
4. Now do your work. Once done send a Pull Request directly from GitHub (go to your branch and click "Pull Request")
|
||||||
5. When your work is merged in mainline, you can safely remove your branch by typing (without quotes): "`git checkout master`" then "`git branch -d name_of_new_branch`" and finally "`git push origin :name_of_new_branch`".
|
5. When your work is merged in mainline, you can safely remove your branch by typing:
|
||||||
|
1. `git checkout master`
|
||||||
|
2. `git branch -d name_of_new_branch`
|
||||||
|
3. `git push origin :name_of_new_branch`
|
||||||
|
|
Loading…
Reference in New Issue