-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgit_basics
18 lines (13 loc) · 871 Bytes
/
git_basics
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
# Create global variables for me
git config --global user.name "Clive Carrington"
git config --global user.email clive.carrington@btinternet.com
git init # create a repository in the current directory
git add . # adds all files to the staging in this directory and below
# or
git add <filename> # to add just one file to the staging area
git remote add origin https://github.com/CliveCarrington/<Repository> # Connect with github repository
git commit -m "Commit message" # commits all files currently staged
git commit -am "commit Message" # commits all files in the current repository to the next local git version
git push origin master # pushes the local copy up to the master on Github
# to pull down a complete copy of an existing project, (no needs to do and cd or Git init)
git clone https://github.com/CliveCarrington/<repository>