git的基本使用

2021-08-20 01:34:05 字數 529 閱讀 8290

一、提交**版本控制;

一般分為三大步:

其中第三步有涉及到兩個方面乙個是

remote repository

,再遠端伺服器上,乙個是

local repository

,再自己工作區上1.$git push origin head:refs/for/master (

head指向當前工作的branch,master不一定指向當前工作的branch,所以我覺得用head還比master好些)

2.$git push origin master:refs/for/mybranch

(在local repository中找到名字為master的branch,用他去更新remote repository下面名字為mybranch的branch)

3.$git push 

4.$git push origin :mybranch

(再origin repository裡面查詢mybranch,刪除它。用乙個空的去更新它,就相當於刪除了)

Git的基本使用

一 準備工作 1.建立庫資料夾 repository 使用者資料夾 develop 2.cd c cd software 清屏 ctrl l 或clear cd repository 然後初始化倉庫 git init bare shared.git 在develop資料夾下建立兩個使用者 user1...

git的基本使用

1 遠端倉庫相關命令 檢出倉庫 git clone git 檢視遠端倉庫 git remote v 新增遠端倉庫 git remote add name url 刪除遠端倉庫 git remote rm name 拉取遠端倉庫 git pull remotename localbranchname ...

git的基本使用

date 2015 12 26 updated 2016 01 10 git是 管理工具,方便開發者之間的協作。現在在各個開發平台上都已經出現了git的視覺化管理客戶端,然而對於通過shell命令對 庫進行管理永遠比視覺化介面上操作來得穩妥,下面根據自身使用經驗,就git的使用規範以及常見命令做入門...