国产一级a片免费看高清,亚洲熟女中文字幕在线视频,黄三级高清在线播放,免费黄色视频在线看

打開APP
userphoto
未登錄

開通VIP,暢享免費(fèi)電子書等14項超值服

開通VIP
Git常用命令

Create remote repo

pwd:/Users/zhanglx/workspace/gittest/
git init --bare

Clone repo from remote repo

git clone /Users/zhanglx/workspace/gittest/

Init a local git repo and add a remote

This is equal to "Clone"

mkdir myrepo
cd myrepo/
git init
git remote add origin /Users/zhanglx/workspace/gittest/

New branch and switch to this branch

git branch test
git checkout test

Type git branch to check which branch you are working on.

Add, modify, commit, reset and checkout history

Git文件狀態(tài)

Git文件的狀態(tài)分為untracked和tracked, untracked文件是指新建的文件,尚未被git管理起來。

tracked又分為三種狀態(tài):

已提交(committed),已修改(modified)和已暫存(staged)。已提交表示文件已被安全地保存在本地數(shù)據(jù)庫中了;已修改表示修改了某個文件,但沒有提交保存;已暫存表示把已修改的文件放在下次提交時要保存的清單中。

Github

git remote show origin 查看相關(guān)信息 git push origin master 將commit的代碼,push到github上。 git pull origin master 將github上的代碼,update到本地。

Delete

git delete file 然后commit的,將無法恢復(fù)。 rm file, 可以通過git checkout -- file進(jìn)行恢復(fù)。 git rm --cached file,只是在緩存中刪除,

恢復(fù)更改的文件 git checkout — //未git add的文件

git reset HEAD //已經(jīng)git add的文件,可以用這個取消add,然后用上一條命令恢復(fù)

Push master branch of locale repo to remote origin

git push origin master

Pull (if there are some conflicts, git will call git merge automatically)

git pull origin master

創(chuàng)建SSH key

ssh-keygen
生成的SSH key文件保存在中~/.ssh/id_rsa.pub

添加SSH key到github

接著拷貝.ssh/id_rsa.pub文件內(nèi)的所以內(nèi)容
打開github賬號管理中的添加SSH key界面的步驟如下:
1. 登錄github
2. 點擊右上方的Accounting settings圖標(biāo)
3. 選擇 SSH key
4. 點擊 Add SSH key
本站僅提供存儲服務(wù),所有內(nèi)容均由用戶發(fā)布,如發(fā)現(xiàn)有害或侵權(quán)內(nèi)容,請點擊舉報。
打開APP,閱讀全文并永久保存 查看更多類似文章
猜你喜歡
類似文章
Git 進(jìn)階指南
git命令
Linux下Git和GitHub使用方法總結(jié)
EEDrone開源四旋翼從零開始(5)--git基礎(chǔ)
{|ihower.tw| blog } | Git 版本控制系統(tǒng)(2) 開 branch 分支和操作遠(yuǎn)端 repo.
GIT版本配置管理
更多類似文章 >>
生活服務(wù)
分享 收藏 導(dǎo)長圖 關(guān)注 下載文章
綁定賬號成功
后續(xù)可登錄賬號暢享VIP特權(quán)!
如果VIP功能使用有故障,
可點擊這里聯(lián)系客服!

聯(lián)系客服