Git is a distributed revision control system. This means that git will track the changes in any directory you tell it to. Starting out with git you will only need a handful of commands. I will try to explain each of these to the best of my knowledge.
Git quick steps. (here we go)
Step one - move to the directory(folder) that you would like to start using git in.
Step two - type in the command
Step three - This is the step that you do your work. Like creating files or directories.
Step four - Now we check that git noticed any changes you have made since step two. At this step we type in the command
Step five - This step we will add our changed files to the staging area. We do this by typing the command
Step six - In this final step we will use the following command to update the file we changed:
Now we have started git to track any changes and completed one cycle of the git work flow of modify files > stage files > commit files.
Quick Recap of commands used:
Step one - change to directory that git is needed.
Step two -
Step three - make your changes
Step four -
Step five -
Step six -
Step seven - rinse and repeat.
Next post I will explain how to set up a repo on GitHub and how to link it up with your work.
Keep coding friends,
Ryan Smyth
Git quick steps. (here we go)
Step one - move to the directory(folder) that you would like to start using git in.
Step two - type in the command
git init . This will set the origin (starting point) for the tracking of your directory.Step three - This is the step that you do your work. Like creating files or directories.
Step four - Now we check that git noticed any changes you have made since step two. At this step we type in the command
git status. This will show us that git noticed the changes.Step five - This step we will add our changed files to the staging area. We do this by typing the command
git add [your filename]. This stages your changes to get ready for the last step.Step six - In this final step we will use the following command to update the file we changed:
git commit -m 'description of what was done'Now we have started git to track any changes and completed one cycle of the git work flow of modify files > stage files > commit files.
Quick Recap of commands used:
Step one - change to directory that git is needed.
Step two -
git initStep three - make your changes
Step four -
git status to see changed filesStep five -
git add [filename] to stage changesStep six -
git commit -m 'description'Step seven - rinse and repeat.
Next post I will explain how to set up a repo on GitHub and how to link it up with your work.
Keep coding friends,
Ryan Smyth
No comments:
Post a Comment