码迷,mamicode.com
首页 > 其他好文 > 详细

git工具 -- repo

时间:2021-02-15 12:26:44      阅读:0      评论:0      收藏:0      [点我收藏+]

标签:nc命令   man   new   using   name   hub   desc   strong   nbsp   

 

资料1:

https://wladimir-tm4pda.github.io/source/git-repo.html

 

sync命令:

repo sync [project-list ]

Downloads new changes and updates the working files in your local environment. After a successful repo sync, the code in specified projects will be up to date with the code in the remote repository.

You can specify project-list as a list of names or a list of paths to local source directories for the projects:
repo sync [proj1 proj2 ... projN ]

If you run repo sync without any arguments, it will synchronize the files for all the projects.

How Repo synchronization works

When you run repo sync, this is what happens:
  1. If the project has never been synchronized, then repo sync is equivalent to git clone. All branches in the remote repository are copied to the local project directory.
  2. If the project has already been synchronized once, then repo sync is equivalent to:
    git remote update
    git rebase origin/branch
    where branch is the currently checked-out branch in the local project directory. If the local branch is not tracking a branch in the remote repository, then no synchronization will occur for the project.

    If the git rebase operation results in merge conflicts, you will need to use the normal Git commands (for example, git rebase --continue) to resolve the conflicts.

The repo sync command also updates the private repositories in the .repo/ directory.

 


 

start

repo start newbranchname [project-list ]

Starts a new branch for development.

The newbranchname argument should provide a short description of the change you are trying to make to the projects.If you don‘t know, consider using the name default.

The project-list specifies which projects will participate in this topic branch. You can specify project-list as a list of names or a list of paths to local working directories for the projects:
repo start default [proj1 proj2 ... projN ]

"." is a useful shorthand for the project in the current working directory.

git工具 -- repo

标签:nc命令   man   new   using   name   hub   desc   strong   nbsp   

原文地址:https://www.cnblogs.com/butterflybay/p/14397910.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!