cd the dir include .git [fatal: Not a git repository (or any of the parent directories): .git]
git config --global user.name "your_username"
git config --global user.email your_email@domain.com
git config --global push.default simple
#.ssh/id_rsa id_rsa.pub
ssh-keygen -t rsa -C "your_email@domain.com"
#upload the id_rsa.pub to git server
git clone git@bitbucket.org:*yourUserName/*yourProjectRepos.git
http://blog.chinaunix.net/uid-20749137-id-718749.html
ssh -i
创建一个本地代码库
cd local_repos
git init
git remote add origin git@bitbucket.org:*yourUserName/*yourProjectRepos.git
git status
git add *
git add .
最后的“.”符号的意思是“所有文件、文件夹和子文件夹”。假如我们只想要把特定文件添加到源代码控制中去,我们可以指定它们:
git add my_file, my_other_file
git commit -m "代码提交信息"
git push origin master
git pull origin master
git log
git checkout -- <filename>
git fetch origin
git reset --hard origin/master
http://www.bootcss.com/p/git-guide/
http://blog.jobbole.com/53573/
eclipse_git:
*****Amend Previous Commit,就是这个按钮每次都会出问题,它的功能不只是复制上次Commit的信息,
而是会把当前的Commit合并到上次的Commit中,这时提交时就会出现rejected的错误。
open the view 'Git Repositories',
1.Configure the 'fetch' to fetch the branch you originally pulled from.
2.Fetch the remote branch.
3.Merge that remote branch onto your local branch.
4.Commit the (merge) change in your local repo.
5.Push the change to the remote repo.