2016-12-13 7 views
1

gitバージョン2.7.4からサブモジュールを使用しています。私はサブモジュールにプッシュしたいthis questionによるとgitバージョン2でサブモジュールを押す

main/ 
    file1 
    file2 
    subm1/ 
     file3 
     file4 
    subm2/ 
     file5 

:私のプロジェクト構造は、このようなものです。

Pushing submodule 'subm1' 
To <submodule git repo> 
! [rejected]  master -> master (non-fast-forward) 
error: failed to push some refs to <submodule git repo> 
hint: Updates were rejected because a pushed branch tip is behind its remote 
hint: counterpart. Check out this branch and integrate the remote changes 
hint: (e.g. 'git pull ...') before pushing again. 
hint: See the 'Note about fast-forwards' in 'git push --help' for details. 
Unable to push submodule 'subm1' 
fatal: Failed to push all needed submodules! 

が、私はこのようなプルを使用する場合は、Already up-to-dateを受け取っ:

cd subm1/ 
git add file3 
git commit -m 'Update file3' 
git push origin master 

私はこのエラーを受け取っている:例えば、FILE3に変更した後、私が使用している、これはそれをプッシュするためのコマンド

subm1$ git pull origin master 
From https://gitlab.com/systemnegar-ai/compare 
* branch   master  -> FETCH_HEAD 
Already up-to-date. 

どのようにサブモジュール起点リポジトリにプッシュできますか?

答えて

0

私のコードは、マスターブランチには、この問題を解決するマスターブランチに切り替えていませんでした。

関連する問題