Skip to content

Instantly share code, notes, and snippets.

@fuchao2012
Created June 30, 2015 09:23
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save fuchao2012/861251b5d24fa790461f to your computer and use it in GitHub Desktop.
Save fuchao2012/861251b5d24fa790461f to your computer and use it in GitHub Desktop.
initial git program in new OS X machine
1. create a new hub in bitbucket
2. create a new foder in your computer and enter it
3. check if there is ssh
```
ssh -v
```
4. create your new ssh-key
```
ssh-keygen
```
5. check if ssh-agent is working
```
ps -e | grep sh-agent
```
6. add the public key to the agent
```
ssh-add ~/.ssh/id_rsa
```
7. copy the public key into bitbucket
```
pbcopy < ~/.ssh/id_rsa.pub
```
8. commit your file and push it
```
git init
git remote add origin git@bitbucket.org:yourname/yourhubname.git
echo 'your name' >> contributor.txt
git add contributor.txt
git commit -m 'initial project with contributor'
git push -u origin master
```
9. in the future dev you can just use
```
git add .
git push origin master
```
@fuchao2012
Copy link
Author

why can not read as markdown...

@fuchao2012
Copy link
Author

someCommand | clip

@fuchao2012
Copy link
Author

npm config set registry "http://registry.npmjs.org/"

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