repo status //查看该文件夹下所有工程目录下的状态,包括一些更改
repo sync //与远程工程同步,本地的更改如果没有commit,不会影响本地的更改,如果出现与本地发生冲突,会出现sync erro
出现错误时,可以去当前的工程目录下git pull,获得远程最新的状态。git pull korg remote_branch:local_branch
repo diff //查看本地未提交的更改
git add --all //添加文件
git commit //commit
git commit --amend //修订上一次提交的msg,如果你想更改commit的注释,可以用该命令
repo forall -c 'git push korg my_dev:remote_branch' //check in。远程的branch名称:korg/remote_branch
error: failed to push some refs to 'ssh://bearr/android/kernel/linux-2.6.31.git'
To prevent you from losing history, non-fast-forward updates were rejected
Merge the remote changes before pushing again. See the 'Note about
fast-forwards' section of 'git push --help' for details.
Everything up-to-date
//如果出现以下git push reject,可以按下面的做
git rebase -i korg/remote_banch
Successfully rebased and updated refs/heads/my_dev.
git push korg my_dev:aster_imx_r9
Counting objects: 17, done.
Delta compression using up to 2 threads.
Compressing objects: 100% (9/9), done.
Writing objects: 100% (9/9), 1.70 KiB, done.
Total 9 (delta 7), reused 0 (delta 0)
To ssh://bearr/android/kernel/linux-2.6.31.git
3b96c8c..ae538dc my_dev -> remote_branch