2016-04-02 16 views
0

Ben git status yaptı ve yeni dosyaların bir demet, örneğin testere:Git'e yeni bir dosya eklemeyi nasıl geri alabilirim?

Değişiklik yapıldı edilecek: (kullanım "git sıfırlama BAŞ ..." unstage kadar) Ben git add -A yaptı ve

new file: project/swiftFile1.swift 
    new file: projec/swiftFile2.swift 

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: project.xcodeproj/project.pbxproj 
    modified: project.xcworkspace/xcuserdata/M.xcuserdatad/UserInterfaceState.xcuserstate 

    Untracked files: 
    (use "git add <file>..." to include in what will be committed) 

    project.xcworkspace/xcuserdata/M.xcuserdatad/WorkspaceSettings.xcsettings 

o

Changes to be committed: 
    (use "git reset HEAD <file>..." to unstage) 

    modified: project.xcodeproj/project.pbxproj 
    modified: project.xcworkspace/xcuserdata/M.xcuserdatad/UserInterfaceState.xcuserstate 
    new file: project.xcworkspace/xcuserdata/M.xcuserdatad/WorkspaceSettings.xcsettings 
    modified: project/Base.lproj/Main.storyboard 
    modified: project/swiftFile1.swift 
    modified: project/swiftFile2.swift 

Ve sonra ben repoya push Bu dosyayı istemiyoruz fark: yukarıdaki tüm dosyaları git için eklenen, şimdi orada bkz

project.xcworkspace/xcuserdata/M.xcuserdatad/WorkspaceSettings.xcsettings 

git push yapmadan önce, bu dosyayı işlemeyi durdurmak için ne yapabilirim (ancak sabit diskimden kaldırmayın)?

Changes to be committed: (use "git reset HEAD ..." to unstage) 

dosya, türü unstage için::

git reset HEAD project.xcworkspace/xcuserdata/M.xcuserdatad/WorkspaceSettings.xcsettings 

bu dosyaya yapılan değişiklikleri geri etmediğini ekleyebiliriz

cevap

1

Sen Söz konusu cevabım var.

+0

Teşekkürler, bu cevabı birkaç dakika içinde bırakmama izin vermez hemen kabul edeceğim;) – user3766930

İlgili konular