How To Use And Install Git

Knowing how to use Git to manage your code is an essential skill to have these days. Sharing and collaborating with others is a great way to build a big project, and to have your code looked at by thousands of debuggers. The commands below show how to set up Git, set up a repository, and push files to it remotely.

sudo su
apt-get update
apt-get install git

Navigate to the Directory you want to use with Git

git init
git add .
git commit -m "initial commit"

Go to github, login, and copy the URL for your project, then paste is customize the command below.

git remote add origin https://github.com/ryangeddesgit remote -v#If origin URL is wrong you can change it with:
#git remote set-url origin https://github.com/you/your.git
git push -f origin master

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store