go4321 发表于 2018-9-18 12:43:39

The use of Git and Bitbucket-51CTO Notes-51CTO博客

  1. Create a directory to contain your repos:
mkdir repo(the name of your repository)2. Switch to repo. Clone your repository:   git clone https://username@bitbucket.org/username/repo.git(the name of your repository)....................................................................................................................................................   A series of operations in your repo directory.....................................................................................................................................................3. git status    The command tells you about how your project is progressing in comparison to your Bitbucket repo.4. Add the new file to a pending commit.   git add filename5. Commit all the changes you added.   git commit -m "..............."6. Push your committed changes back to your Bitbucket repository.   git push -u origin master...................................................................................................................... 新建分支:git branch abc(分支名)查看分支:git branch带*为当前分支切换分支:git checkout abc在分支abc中进行更新并确认无误后,可与master分支合并,如下:先切换到master分支:git checkout master然后将abc分支与当前分支合并:git merge abc删除一个分支:git branch -d abc-d只能删除已经参与了合并的分支,如果想删除为何master合并的分支可以用-D
页: [1]
查看完整版本: The use of Git and Bitbucket-51CTO Notes-51CTO博客