Skip to content

Instantly share code, notes, and snippets.

@hsipeng
Created July 3, 2017 08:48
Show Gist options
  • Select an option

  • Save hsipeng/cf8efd3dc0d0837c059ae623cbddc218 to your computer and use it in GitHub Desktop.

Select an option

Save hsipeng/cf8efd3dc0d0837c059ae623cbddc218 to your computer and use it in GitHub Desktop.

begin

sudo apt-get install git git config --global user.name "Your Name" git config --global user.email "your email"

ssh-keygen -t rsa -C "youremail@example.com"

win

$ cd ~/.ssh

$ eval $(ssh-agent)

>Agent pid 7636

ssh-add ~/.ssh/id_rsa

git remote add origin git@github.com:michaelliao/learngit.git

first push:

git push -u origin master

git push origin master

branch

git branch -a git branch git branch test

git checkout test git branch -d test

git branch -r -d origin/branch-name

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