Everything you need to know about git | Part - 2
How to use Git version control. Everything you need to know before using git.
How to use Git version control. Everything you need to know before using git.
If you have never worked with github before, then it can be a bit confusing to start with all those terminal commands. Push Pull Merge etc. But honestly, its quiet simple once you understand what everything is.
So let’s explore Git a bit more, if you are beginner then we recommend, first complete the Part-I of this series(link here) and then continue here.
1. How to fork a repository ?
But what is forking ?
Forking a repository means, making a working copy of someone else’s repository.
- Step - 1: Click on the Fork button in the repository page
- Step - 2: Choose the name under which you want to fork the repository
You fork will be created
2. How to clone a git repository ?
But what is cloning ?
Cloning is another word for downloading a repository in your local machine.
Steps to clone the git repository:
- Step - 1: copy the git repository link
- Step - 2: run the command on your terminal
Contratulations! Your successfully forked and cloned a repository.
3. How to pull from a git repository ?
What is pull ?
By pulling changes to a git repository, we load the changes on our local machine made by someone else on the repository.
- Open your terminal and move into the directory, which contains your git repository and type the command
git pull
4. How to add a README ?
What is a readme file ?
A readme file help other developers and reviewers to know, what the project contains.
- Method - 1: Add a README from terminal
- Method - 2: Add README directly from Github
Congratulations! You have successfully added a README file.
5. How to add a LICENCE ?
What is a licence file ?
A licence file lay the guidlines about the distribution of your project.
- Step - 1: Click on
Create new file
- Step - 2 : Type LICENCE on the “Name you file…” bar and click on
Choose a license template
Step - 3: Choose a license template from the left side options and click on
Review and submit
Step - 4: Click on
Commit new file
Congratulations! You have successfully added a LICENCE file
Reviews
If You find it interesting!! we would really like to hear from you.
Ping us at Instagram/@the.blur.code
If you want articles on Any topics dm us on insta.
Thanks for reading!!
Happy Coding