Every developer in the world has to track their changes in project to easily maintain the code base.
What is git and it uses?
Git is a version control system used for saving history of project and track the changes that you have done everyday on the projects that you are working.
By using git you can track the changes,
- who did it?
- When did they done it?
- What did they change it?
If you have a existing project you can start using git right now by typing the following command in terminal.
git init
This command is used to initialize the necessary git files like .git in the current directort of the project which consists all the information that we save using git commads and repository details .
git init project-name
The command is used to create a project with git files in it so that you can directly start using git commands in it and save the changes that you have done.
git add .
The command git add is used to add the files to the staging area of the git from local system, after which you can commit the files to save the history that you have changed.
git commit -m "message goes here"
- These command is the most important command of all because these command consists of the meessage of the changes you have done upto now. - Lets break the command "commit" These one commits all your changes that you have made and added to the git.
- "-m" This is the short hand notation of the message that you want to give.
-
" " in the double quatation the actual meassage goes for the changes you have done upto now,
- the message has to been in such a way that you can identify what you have changed even after you are looking the project several days also you can identify
Top comments (0)