Created
June 30, 2015 09:23
-
-
Save fuchao2012/861251b5d24fa790461f to your computer and use it in GitHub Desktop.
initial git program in new OS X machine
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 [email protected]: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 | |
``` |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
why can not read as markdown...