免責聲明

Disclaimer (免責聲明)
繼續閱覽代表您接受以上的免責聲明.
To continue reading means you accept the above disclaimer.

2014年7月11日 星期五

Create a new repository for git + bitbucket

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' ]

沒有留言:

張貼留言