To start, please make sure that you already have:
- GitHub account (https://github.com/)
- Git Bash software (http://git-scm.com/)
This is step by step guideline to fork, clone and push back at GitHub server.
1. Open any folder at GitHub that you want to fork (copy to your GitHub folder). Then press Fork at top-right of the page
2. After fork, the page will redirect you to your GitHub account. Next, we want to clone the file to your local repository (own computer). Copy the link first at the folder you want to clone.
3. Open Git Bash application then change the working directory to your preferred folder first.
code: cd "folder url"
example: cd "/e/Training/Training 2015/Data/Module 4/Week 1 - Course Project 1"
Then request for clone by entering the following command:
code: git clone URL
example: git clone https://github.com/fairulshahrizat/practice_assignment.git
After that you can closed Git Bash & check your preferred folder for content.
4. After you are done with your task, you will want to push the emended in the folder to your GitHub account back. To do this, follow this step:
- From the local repository folder, right click and select 'Git Commit Tool'.
- There, select the files you want to upload, under 'Unstaged Changes' and click 'Stage Changed' button. (You can initially click on 'Rescan' button to check what files are modified and not uploaded yet.)
- Then write a Commit Message and click 'Commit' button.
4. Now right click in the folder again and select 'Git Bash'
5. Type: git push origin master and enter your credentials (GitHub account).
6. Then you can check back your GitHub folder to see the update. Click commits for version details.