git的基本使用

2021-08-14 14:46:46 字數 511 閱讀 8915

一、安裝

配置使用者資訊:

$ git config --global user.name "your name"

$ git config --global user.email "[email protected]"

使用 --global後你以後所有的專案都會預設使用這裡配置的使用者資訊。如果要在特定的專案中使用其他名字或者電郵,只要去掉 --global 選項重新配置即可。

二、使用

初始化: git init     初始化後當前目錄下會出現乙個名為.git的目錄

轉殖:git clone [url]

比如:git clone

git:

檢查檔案狀態:

git status

顯示更改的檔案(還未暫存的/已暫存等待提交的)

提交暫存:git add 如:git add -u

提交更新:git commit

刪除檔案:git rm 如

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的使用規範以及常見命令做入門...