Create a new repository and 'upload' ( push) to bitbucket
//=== initialize local repository first
~$ mkdir projectname
~$ cd projectname
~$ nano .gitignore
venv
env
*.pyc
~$ git init
~$ git add .
~$ git commit -m 'first commit'
*** git commit -a automatically stage all tracked, modified files before the commit ...
~$ git commit -a -m 'commit all changed files'
http://stackoverflow.com/questions/19877818/git-commit-m-vs-git-commit-am
//=== remote repository
0. use web browser to login bitbucket to create remote repository "repoName.git"
1. ~$ git remote add origin https://bitbucket.org/ownerName/repoName.git
[ add remote branch 'origin' ]
2. ~$ git push origin master
[ push to remote branch 'origin' from local branch 'master' ]
沒有留言:
張貼留言