-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
35 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
cd ~/.ssh | ||
ssh-keygen -t rsa -b 4096 | ||
|
||
将 生成的id_rsa.pub 放到setting 的sshkey 中 | ||
|
||
绑定成功直接克隆ssh | ||
|
||
slociv@gg ~/l/git> git clone [email protected]:wydtt/TestLab.git | ||
正克隆到 'TestLab'... | ||
警告:您似乎克隆了一个空仓库。 | ||
slociv@gg ~/l/git> ls | ||
TestLab/ | ||
slociv@gg ~/l/git> cd TestLab/ | ||
slociv@gg ~/l/g/TestLab (main)> ls | ||
slociv@gg ~/l/g/TestLab (main)> echo hello>hello.txt | ||
slociv@gg ~/l/g/TestLab (main)> git add . | ||
slociv@gg ~/l/g/TestLab (main)> git commit -m "first commit" | ||
[main(根提交) 630181f] first commit | ||
1 file changed, 1 insertion(+) | ||
create mode 100644 hello.txt | ||
|
||
|
||
git push 推送本地仓库到远程仓库 | ||
git pull 拉取 |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
rm 和git rm 是有区别的 | ||
rm 内容后需要 git add 才会删除暂存区的内容 | ||
所以有点麻烦一般用 git rm -r 递归删除就行了 | ||
最后不要忘记了提交 删除版本库里的内容 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
前提是这里面的文件不能已经添加到版本库中 | ||
需要首先 git rm 删除不需要的文件并提交 | ||
|
||
空文件夹不会纳入版本控制 temp/ 文件夹的格式如上 | ||
|
||
|
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.