This tutorial helps people who are completely new to git to get familiar with common git's commands.
-
Introduction:
- Create a git account on https://github.com.
- Create a new repository on git.
- Download you repository to your local machine.
- (Option) Add public key to your git account - Git will not request your username and password every time you push or commit after you add your public key.
-
First_commit:
- Create new files.
- Create new folders.
- Commit new files and folders to your local git.
- Push your files and folder to server git.
-
Modify_file:
- Modify a file.
- Commit modified file to local git.
- Push the committed file to server git.
-
New_branch:
- Create a new branch.
- Checkout to new branch.
- Create new files, and modify new files.
- Commit to local git.
- Push new branch to server git.
-
Create Pull Request:
- Create pull request from branch created in part 4 into master.
-
Create a conflict:
- Create a new branch.
- Modify the files that have been modified in part 4.
- Commit to local git.
- Push new branch to server git.
- Create pull request - conflict occurs!!!
-
Solve conflict:
- Fetch files from serve git to local git.
- Solve confict.
- Commit and push branch to server git.
- Create pull request.