CodeForMyself

SomeThingAboutCode/Cat/Murmur

Follow publication

Mino chen
CodeForMyself
Published in
Jan 24, 2021

--

每天練一點面試題,避免要面試的時候,考官跟你彼此面面相覷尷尬吧!

這個指令假定你的本機有個分支名叫:master ,他會幫你在遠端分支也建立一個叫 master 的分支。

通常會在我們本機建立新分支,而 GitHub 上沒有這個分支時,當你 git push 上去,他就會說:sorry 遠端沒有分支喔,要不要建一個,這個時候就會用到。

它的完全體長這樣,意思是請你在遠端也建一個跟我本地一樣的分支,並且取名一樣。

阿萬一你不想遠端分支叫 master 你想要改名叫 kitty ,也可以喔!那就這樣寫:

那遠端那個跟你本機一模一樣的內容的分支,就改名叫 kitty 了,以後你再從本機的 master 做 git push 就會在遠端的 kitty 被更新!

Sign up to discover human stories that deepen your understanding of the world.

Free

Distraction-free reading. No ads.

Organize your knowledge with lists and highlights.

Tell your story. Find your audience.

Membership

Read member-only stories

Support writers you read most

Earn money for your writing

Listen to audio narrations

Read offline with the Medium app

--

--

CodeForMyself
CodeForMyself
Mino chen
Mino chen

No responses yet

Write a response