Skip to content

Instantly share code, notes, and snippets.

@dgcollier
Created September 22, 2015 03:56
Show Gist options
  • Save dgcollier/a458f25a035cf63673d0 to your computer and use it in GitHub Desktop.
Save dgcollier/a458f25a035cf63673d0 to your computer and use it in GitHub Desktop.
Initialize new repository from CLI:
$ echo "# {yourproject.dev}" >> README.md
$ git init
$ git add README.md
$ git commit -m "first commit"
$ git remote add origin [email protected]:{username or org. name}/{yourproject.dev}.git
$ git push -u origin master
Create new branch:
$ git checkout -b {new_branch_name}
$ git push{new_branch_name}
Show branches:
$ git branch
Keeping up-to-date with Git:
$ git status
$ git add {file_path} -OR- $ git add -A [for all]
$ git commit -m "{your_commit_message}
$ git push origin {master OR branch_name}
if group project, initialize pull request, then:
$ git pull origin master
$ git push origin {branch_name}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment