Skip to content

Instantly share code, notes, and snippets.

@harrisonmalone
Last active September 3, 2019 00:53
Show Gist options
  • Select an option

  • Save harrisonmalone/cc45452679b2bd715159438f0b6e846e to your computer and use it in GitHub Desktop.

Select an option

Save harrisonmalone/cc45452679b2bd715159438f0b6e846e to your computer and use it in GitHub Desktop.

1

saving our work to git

git add .

git commit -m "a message"

2

check what branch you're on, any changes to the files

git status

3

if you want a directory to have git in it

git init 

4

to add a remote (github address) to your local working directory

git remote add origin <something.git>

we're adding a remote and we're naming that remote origin

5

to push code to github

git push origin master

when it says -u that means that it's making that branch and remote the defaults so you can just do git push

we're pushing the code to the origin remote (the github adress)

the code that's pushed will only be the master branch

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment