御世話になります。
git hub 初心者になります。
現在、master develop test というbranchがあります。
test で動かし、develop に変更する形をとっています。
test でバグを発見し、checkout develop へ移動しようとしたのですが、以下のエラーが出ました。
git
1error: Your local changes to the following files would be overwritten by checkout: 2 .gitignore 3 src/Controller/AjaxController.php 4 src/Controller/UsersController.php 5 src/Template/MyPages/index.ctp 6 webroot/js/mypages_index.js 7Please, commit your changes or stash them before you can switch branches.
原因をわからず、エラーメッセージを頼りに、いろいろなコマンドを打ちましたが、うまく移動できません。
git
1git stash save 2git clean 3git reset --hard HEAD
status 状態は以下のようになっています。
git
1On branch test 2Changes not staged for commit: 3 (use "git add <file>..." to update what will be committed) 4 (use "git checkout -- <file>..." to discard changes in working directory) 5 6 modified: .gitignore 7 modified: src/Controller/AjaxController.php 8 modified: src/Controller/UsersController.php 9 modified: src/Template/MyPages/index.ctp 10 modified: webroot/js/mypages_index.js 11 12no changes added to commit (use "git add" and/or "git commit -a")
modified:の記述は赤色になっています。
解決策がありましたら、教えてください。
回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
2016/10/26 07:57
2016/10/26 08:05
2016/10/26 08:07
2016/10/26 08:08