Small change to git.md, added some codeblocks

master
Nathan Steel 6 years ago
parent 9fa08ed980
commit 37498322c6

@ -1,18 +1,20 @@
# Create a GitHub repository and setup with terminal # Create a GitHub repository and setup with terminal
Initialise the local repo Initialise the local repo
git init `git init`
Add a file to the repo, in this case the file was "git" Add a file to the repo, in this case the file was "git"
git add git `git add git`
Commit to the repo, with a message Commit to the repo, with a message
git commit -m "Commiting the empty repository to GitHub" `git commit -m "Commiting the empty repository to GitHub"`
Add the local repo to the GitHub repo Add the local repo to the GitHub repo
git remote add origin https://github.com/SirAney/references.git `git remote add origin https://github.com/SirAney/references.git`
Push the commits from the local repo to the GutHub repo Push the commits from the local repo to the GutHub repo
git push -u origin master `git push -u origin master`
# Pull a repo from GitHub to local machine # Pull a repo from GitHub to local machine
git init git init
git pull http://github.com/USER/REPO git pull http://github.com/USER/REPO
or
`git clone https://github.com/USER/REPO'
# Commit new changes to the repository # Commit new changes to the repository
git add file git add file

Loading…
Cancel
Save