1. 程式人生 > >git push 總結

git push 總結

轉自 https://blog.csdn.net/wh_19910525/article/details/7438183  感謝作者

$ git push ssh://[email protected]/rt4ls.git master // 把本地倉庫提交到遠端倉庫的master分支中


$ git remote add origin ssh://[email protected]/rt4ls.git
$ git push origin master 


這兩個操作是等價的,第二個操作的第一行的意思是新增一個標記,讓origin指向ssh://[email protected]/rt4ls.git,也就是說你操 作origin的時候,實際上就是在操作ssh://
[email protected]
/rt4ls.git。origin在這裡完全可以理解為後者 的別名。


    注意:需要說明的是,預設情況下 這條語句等價於提交 本地的master分支,到遠端倉庫,並作為遠端的master分支。
    如果想把 本地的某個分支test 提交到 遠端倉庫,並作為遠端倉庫的master分支,或者 作為另外一個名叫test的分支,那麼可以這麼做。

$ git push origin test:master         // 提交本地test分支 作為 遠端的master分支
$ git push origin test:test              // 提交本地test分支作為遠端的test分支

如果想刪除遠端的分支呢?類似於上面,如果:左邊的分支為空,那麼將刪除:右邊的遠端的分支


git push origin :test              // 剛提交到遠端的test將被刪除,但是本地還會儲存的,不用擔心。

相關推薦

git push 總結

轉自 https://blog.csdn.net/wh_19910525/article/details/7438183  感謝作者$ git push ssh://[email protected]/rt4ls.git master // 把本地倉庫提交到遠端倉庫

Git總結筆記4-git push origin master 報錯的解決方法

failed 總結筆記 rebase nbsp read hint err ont version 1 錯誤提示如下: 2 [[email protected]/* */ php]# git push -u origin master 3 To [ema

git命令總結-提交push,分支合併pull,切換版本checkout

1. git提交命push git config --global user.name "git使用者名稱" git config --global user.email "git密碼" git add . git commit -m "提交內容介紹" git remo

Git push 失敗原因總結

hint: Updates were rejected because the remote contains work that you do hint: not have locally. This is usually caused by another reposi

git使用總結

ash war with 搭建 git服務器 quest 配置文件 username 下使用 一、安裝 $ sudo apt-get install git ubuntuxia windows下使用msysgit 二、使用 1.配置   $git config -

Git 問題總結

gin user 沖突 windows 技術分享 tac 意思 ted wid 打開eclipse中的windows-->Preferences-->Team-->Git-->Configuration-->User Settings.然後點A

git push.default設置

ted csdn 老版本 specified 相同 def nbsp 8.4 cto 轉自:http://blog.csdn.net/daijingxin/article/details/51326715 在進行一次空倉庫的提交時,我遇到了這個警告 警告如下:

02_創建Git倉庫,克隆倉庫,git add,git commit,git push,git pull,同行沖突,不同行沖突的結局方案,git mergetool的使用

round rom weight art sdn automatic remote then config 1 創建Git資源庫,殘酷文件夾信息 創建git資源庫的命令: git init –bare 倉庫名稱 (當中-bare表示的意思是空的庫的意思)

git命令總結

feature 不變 arc 所有 知識 說明 variable revert ping 基礎知識 這裏我就不廢話什麽是Git了,程序猿用的東西,不是程序猿估計也不會想用。我每天使用 Git ,但是很多命令記不住。一般來說,日常使用只要記住下圖6個命令,就可以了。但是熟練使

git push前怎樣遺棄掉歷史commit

mit 拷貝 easy 下載 性能 water repos 無法 ont 今天寫了一天代碼,然後 git hub commit 了 多達 7 次。 可是都沒有把改動正式推送上去。結果最後要推送的時候發現中間有一個提交文件超過了100M. 是 vs 的代碼性能分析報告 .

git push提交時卡住

卡住 提交 oba ack windows span class send oca windows可能會有這個問題, 需要設置 git config --global sendpack.sideband false 和 git config --local sendp

git push 失敗

技術 jsb watermark blog img data- ext fill con 先上圖 已經加入了sshkey 為撒ssh 不成功,.push 僅僅能通過http方式,每次都要輸入用戶 password非常麻煩. 蛋碎了幾個月,今天節前最後一個

<問題解決02>Linux虛擬機使用git push報錯--解決方案如下:

hello class lai git onf http afr 再次 log 問題描述:   使用git push 報錯:     error: The requested URL returned error: 403 Forbidden while accessing

git push 沖突

錯誤 -1 images font 兩個 img size 部分 ges 當多人上傳同一項目代碼出現沖突時: 例如: 有一個倉庫Test,兩個同學A和B,分別clone到自己的本地目錄,A同學修改文件file(push到github),B同學也修改了文件file,B同學

Git 使用總結

stat 本地 公鑰 shel 切換 mint 無法登錄 貢獻 執行 Windows用戶git官網下載安裝包:https://git-scm.com/雙擊一路Next安裝完畢打開Git Bash,設置如下, $ git config --global user.na

git push origin與git push -u origin master的區別

2.0 matching 命令 參數 主機 主機名 bsp 如果 方法 $ git push origin 上面命令表示,將當前分支推送到origin主機的對應分支。 如果當前分支只有一個追蹤分支,那麽主機名都可以省略。 $ git push 如果當前分支與多個主機存在

git push origin master 遇到的分支問題

push 但是 提交 ack tro 使用 原因 str 修改 我從master分支創建了一個issue1分支,做了一些修改後,使用git push origin master提交,但是顯示的結果卻是‘Everything up-to-date‘, 發生問題的原因是git

git push

tortoise 圖片 oschina .cn 比較 快的 center tom nis 確保 gitlab裏項目的members裏有當前user,即有push權限。 http://blog.csdn.net/yanzi1225627/article/details/1

[轉發]解決 git push Failed to connect to 127.0.0.1 port 45463: 拒絕連接

pre host 導致 占用 span www. git push github con 使用Github pull 代碼突然報錯: Failed to connect to 127.0.0.1 port 43421: Connection refused 使用 ls

git linux git push到碼雲

https 復制 分享 strong save fill mail pan iss 進入https://gitee.com/profile 查看自己的賬號和郵箱,記到記事本下來,下面會用到。 打開Git輸入命令git config –global user.name “