2016-07-16 5 views
1

私はマスターブランチを持っていて、誰かが私が望まないいくつかの変更を行いました。コミットせずに変更を取り消すことは可能ですか?gitの変更を元に戻しません(マスターブランチ)

現状:

git status 
On branch master 
Changes not staged for commit: 
    (use "git add <file>..." to update what will be committed) 
    (use "git checkout -- <file>..." to discard changes in working directory) 

     modified: bazinga.php 
     modified: bazinga2.php 

no changes added to commit (use "git add" and/or "git commit -a") 

だから、基本的には古いbazinga/bazinga2ファイルに戻します。

答えて

2

一つの答え( "Gitチェックアウトを - ..." を使用し、作業ディレクトリの変更を破棄するように)Gitのステータス情報

に隠れ

以下のコマンドを使用してみてください。

正確にリモートブランチが

git fetch origin 
git reset --hard origin/master 

それとも

git checkout . 

を行うことができます一致参考に、あなたのブランチを設定

git checkout bazinga.php 
git checkout bazinga2.php 
関連する問題