forked from stheophil/wahlversprechen
-
Notifications
You must be signed in to change notification settings - Fork 1
Intro Github
Jannik Steinmann edited this page Nov 8, 2017
·
1 revision
In general, there are a few simple steps to follow if anyone wants to make changes to the repository:
-
Fork this repository
- Click "Fork" in the top right corner of this page
- This creates a copy of the repo under your own account
-
Clone your fork to your local computer
- Click the green button "Clone or download" just above the file listings on the of your fork
- Copy the URL to your clipboard
- Type
git clone <paste the URL here>
wherever you want it in your file system (This creates a new folder and downloads all the files)
-
Set the upstream repo
- This step is needed to keep your fork up to date later on
- Type
git remote add upstream https://github.com/codeforosnabrueck/wahlversprechen.git
into your terminal - Type
git fetch upstream
into your terminal. This will download all the original files from this repository as well so you can merge them later locally (Step 7).
-
Change the the branch
- Change to whatever branch most suits to what you are planning to do
- Type
git checkout <branch name>
(If there are no branches besides the master yet, you can skip this step)
-
Do all the changes you want!
-
Test whether everything works fine!
-
Add your files to the index
- Type
git status
to check all the files that have been edited - Type
git add <file name>
for all files that you want to add or simplygit add -A
to add them all
- Type
-
Commit your work
- Type
git commit -m "Useful description"
to save a "screenshot" of your process - This step should be done for all simple but complete changes to your files because commits can later be reverted
- Type
-
Pull the the remote repo
- Before you push your files to this remote repo, you need to check for the latest updates of it
- To download all the latest changes, type
git pull upstream <branch name>
into your terminal and download all files
-
Fix merge conflicts
- If there are any, fix them.
- You can use
git diff <file name>
to see changes between your local and the remote file
-
Push your files
- To upload your local repo, type
git push origin <branch name>
- If all merge conflicts were fixed in the previous step, your files should now be uploaded to your remote fork
- To upload your local repo, type
-
Start pull request 🎉
- Go back to your fork in the browser and hit "New pull request" on left right next to the "branches"-pulldown
- Click "create pull request" and enter all the specifics of what you have done
- Here you can also link to issues
- Click "Create pull request"