I recently learned how to use the terminal with github (thanks to the very lovely people at codebar Birmingham!) I had to write down all the commands otherwise there is no chance I'd remember them all. There they are:
To update the fork on my machine (bring down all the changes from the repository on github so I have the most up to date version to work with) - You don't need to do this if you're the only one working on the project as it'll always be the most up to date version.
git checkout master git pull
git pull upstream master
If you make changes to the files and want to make a pull request, this is the sequence of things you need to do:
1) To see changes you've made
2) Add the file to the next commit
git add nameofthefile OR if you want to add all files in the directory including new ones git add . ORRR if you want to add all files and new ones in the directory and also any other files in other directories within this root folder git add --all
3) Repeat step one to see the changes you've made that have now turned green (or changed colour depending on terminal settings?)
4) Type the following and then type out your commit message. Best to do this in bullet points and if you're fixing a particular issue - include 'Issue #24' for example to link it to the issue.
5) In terminal the ^ arrow means ctrl. So click ^o to write code (save)
6) I didn't need to change the file name for this so then pressed enter and ^x
7) So far you've only sent it to the git on your computer - now you need to send it to the repository/fork on GitHub, so type:
8) Now open your browser and go to the github website.
9) Go to my repos and open up the one you're working on.
10) Click on pull requests
11) Select 'New pull request'
12) Type in any extra detail needed and send. Then that's it.
To add an extra page to a repo, just copy and paste a current one in my own folder on my comp, change what needs changing and then do as above.
To make my own github repo:
1) Click 'new' the github site and initialise with readme file.
2) Clone it.
3) Make a folder on my comp and locate it in the terminal. From inside that folder, type:
git clone https://github.com/helen8297/Helensfirstgithub.git
4) When making changes, complete the above and then when you've done git push, that has sent it and that's it.
Useful future tip:
If I ever get a new computer, type the following in to do something good in the terminal - no idea what it means.
git config --global core.editor "nano"