git 2.0的push.default的設定

官方訊息如下:

warning: push.default is unset; its implicit value is changing in
Git 2.0 from ‘matching’ to ‘simple’. To squelch this message
and maintain the current behavior after the default changes, use:

To squelch this message and adopt the new behavior now, use:

When push.default is set to ‘matching’, git will push local branches
to the remote branches that already exist with the same name.

In Git 2.0, Git will default to the more conservative ‘simple’
behavior, which only pushes the current branch to the corresponding
remote branch that ‘git pull’ uses to update the current branch.

See ‘git help config’ and search for ‘push.default’ for further information.
(the ‘simple’ mode was introduced in Git 1.7.11. Use the similar mode
‘current’ instead of ‘simple’ if you sometimes use older versions of Git)

換句話說,在Git 2.0,若將push.default設為matching,則在push時將所有local branch的變動,推上遠端branch,若設為simple,則只會推當前的branch的變動,至遠端branch。

git:快速切換到上一個branch

假設你現在的branch是master:

就是這麼簡單,這跟cd – 是一樣的。

Git/Github初用教學

medium_4365495446

任何一個有規模的網站都不會是只有一個網站開發者,於是版本控制就變得很重要,如果你還在用SVN,那真得很遺憾,因為Git搭配Github好用太多了,因為Git記錄的是內容,而SVN記錄的是版本,這之間有很大的不同,這篇文章給還沒使用過Git/Github但卻已聽聞這有多好用的人一個簡單的教學。
繼續閱讀 “Git/Github初用教學”