2011-01-29 15 views
14

Genel bir depom var. Hiç kimse başka bir şey için çatal atmadı, çekti ya da başka bir şey yapmadı. Bir dosyaya küçük değişiklikler yaptım, bunları başarılı bir şekilde yaptım ve zorlamaya çalıştım. 'Her şey güncel' diyor. Şubesi yok. Gitmek için çok ama çok yeniyim ve yeryüzünde neler olduğunu anlamıyorum.git push, her zaman güncel olmayan herşeyi anlatıyor

git remote show origin söylüyor:

HEAD branch: master 
    Remote branch: 
    master tracked 
    Local ref configured for 'git push': 
    master pushes to master (up to date)

Bu bugüne kadar DEĞİL anlıyoruz yapmak için neler yapabileceğini Herhangi fikirler?

Teşekkür

Güncellemeler: git status:

# On branch master 
# Untracked files: 
# (use "git add ..." to include in what will be committed) 
# 
#  histmarkup.el 
#  vendor/yasnippet-0.6.1c/snippets/ 
no changes added to commit (use "git add" and/or "git commit -a")

git branch -a:

* master 
    remotes/origin/master

git fsck:

dangling tree 105cb101ca1a4d2cbe1b5c73eb4a238e22cb4998 
dangling tree 85bd0461f0fcb1618d46c8a80d3a4a7932de34bb

Güncelleştirme 2: Değiştirilen dosyayı yeniden açtım ve yaptığımı bildiğim değişiklikler gitmişti. Bu yüzden tekrar ekledim, git status, git add filename, git commit -m "(message)" ve git push origin master teçhizatından geçtiniz ve aniden bu şekilde olması gerektiği gibi çalışıyor.

Güncelleme 3: git reflog çıkışı:

009251 [email protected]{0}: commit: added copy/paste keybindings 
06920f9 [email protected]{1}: commit: Minor .gitignore tweak 
84aa30c [email protected]{2}: checkout: moving from master to master 
84aa30c [email protected]{3}: checkout: moving from ec16cca979045547a5444e20f48ed468dee81dd4 to master 
ec16cca [email protected]{4}: commit: Added keybindings for copy/paste 
5c4a611 [email protected]{5}: commit: remember-mode keybinding to M-R 
f3e4729 [email protected]{6}: commit: Correcting last push which wiped out some stuff 
fa28a3e [email protected]{7}: checkout: moving from master to fa28a3ed80eb0c6d4375ae77060d5cb4143d6a8e^0 
84aa30c [email protected]{8}: commit: Modified keybindings, added LaTeX hook 
10e7718 [email protected]{9}: commit: Added a few keybindings 
d62378b [email protected]{10}: commit (initial): first commit
+0

Nasıl ittiniz? Push komutunun çıktısı neydi? 'Git log --decorate' size ne gösterir? –

+0

"git push origin master" ile itildim. Çıktı "Her şey güncel" idi. 'git log --decorate' dünün de dahil olmak üzere 3 adet işi gösteriyor, ama bugünkü değil. – Wolf

+0

Diğer taraftan çekmeyi denediniz mi? İşe yarıyor mu? – Tom

cevap

11

DÜZENLEME: görünüyor Bu soruya yorumları görmek doğru bir çözüm değildir. Ben cevap git git-bir ipucu geleceğe birisine yardımcı olabilir bir şey eklemek çünkü cevabı bırakıyorum.

Merhaba, işinize başlamadan önce eklediniz mi?

+0

Teknik olarak, ben git commit -a -m '(message)' Wolf

+1

@wolf koştum. -a sadece dosya zaten izleniyorsa bir dosya ekler - add komutuna bir vuruş verin ve bunun yardımcı olup olmadığını görün – Tom

+0

Dosya zaten izlendi ve 'durumu status -s' değiştirilmiş olarak gösterdi. Git işlemi yaptıktan sonra -a -m (mesaj) "' artık değiştirilmiş olarak gösterilmiyor. Git dosya ismini denedim (çünkü dizinde henüz izlemediğim bazı şeyler var) ve hala 'Her şey güncel' diyor. – Wolf

12

deneyin -

git add . 

gibi bir şey

git commit -m "what you changed" 

(http://gitref.org/remotes/#push gittiğim almak için yararlı bu siteyi bulmak) önce

(nokta unutmayın)

git config push.default tracking 

http://git-scm.com/docs/git-config:

push.default

eylem git push hiçbir refspec komut satırında verilirse, hiçbir refspec uzak yapılandırılmış almalı tanımlar ve hiçbir refspec verilen seçeneklerden hiçbiri ima komut satırında.Olası değerler şunlardır: yourlocalbranch veya başka bir dalı (muhtemelen kökenli ustanın yerel kopyası olurdu) master olabilir

* nothing - do not push anything. 
* matching - push all matching branches. All branches having the same name in both ends are considered to be matching. This is the default. 
* upstream - push the current branch to its upstream branch. 
* tracking - deprecated synonym for upstream. 
* current - push the current branch to a branch of the same name. 
+1

Her şey "güncel" olmak üzere inanılmaz bir şekilde sıkışmıştı. – sayth

+0

"git config push.default tracking" Bu mükemmel ve güncellenmiş bir repo'um – Sajeev

+0

Teşekkürler! Sorunumu çözdü! – aaamourao

4

Kullanım

git push upstream yourlocalbranch:master 

. Emin değilseniz --verbose ve --dry-run seçeneklerini kullanın.

+0

'u itmek için varsayılan bir şube tanımlanmadan önce oldu. Teşekkürler - yalnızca bu sorunumu çözdü – sdbbs

İlgili konular