2017/04/06 - Git tutorial¶
1.Configuring GitHub¶
Setup github’s username and email
git config --global user.name "user_name"
git config --global user.email "email_id"
3.Create a README¶
The README file is generally used to describe what the repository contains or what the project is all about.
4.Adding repository files to an index¶
git add README
5.Committing changes made to the index¶
Once all the files are added, we can commit it. This means that we have finalized what additions and/or changes have to be made and they are now ready to be uploaded onto our repository.
git commit -m "message"
6.Creating a repository on GitHub¶
Create a repository on GitHub. Notice that the name of the repository should be the same as the repository’s on the local system.
Once this is created, we can push the contents of the local repository onto the GitHub repository in your profile. Connect to the repository on GitHub using the command
git remote add origin https://github.com/user_name/Mytest.git
7.Pushing files in local repository to GitHub repository¶
The final step is to push the local repository contents into the remote host repository (GitHub), by using the command
git push origin master
Summary¶
I have used some version control system such as RCS, CVS, SVN , and now I learned another one : GIT. Github is a famous platform around the world, so this time I want to learn how to use it to manage my project. This is my project on github.
Reference¶
[1] https://www.howtoforge.com/tutorial/install-git-and-github-on-ubuntu-14.04/
- [2] Github tutorials