Git Basics from the Command Line
16 Apr 2016Using Git from the Command Line

Install Git
In order to use the git command we’ll need to install git first.
sudo apt-get install gitCreate a project folder
Now that git is installed, let’s create a project folder where our repository will be located.
sudo mkdir yourNewFolderNavigate to the folder you just created.
cd yourNewFoldergit initPull the repository down
Let’s grab the desired repository and save the code locally.
git pull http://yourDesiredRepositoryURLWrite your code
Make your changes/fixes and save.
Add the modified files to the commit
git add theFileYouModified.jsCommit your changes
git commit -m "this is your commit message"Update the repository
Now that you have written and committed your code, it’s time to push it to the repository.
git push http://yourDesiredRepositoryURL