【GIT】【命令行】
1) 進入某沒有做git的目錄: git init -》[email protected] MINGW64 ~/PycharmProjects/user_data (master)
2) 新建文件a.txt
[email protected] MINGW64 ~/PycharmProjects/user_data (master)
$ git status
On branch master
No commits yet
Untracked files:
(use "git add
a.txt
3)
[email protected] MINGW64 ~/PycharmProjects/user_data (master)
$ git add *
[email protected] MINGW64 ~/PycharmProjects/user_data (master)
$ git status
On branch master
No commits yet
Changes to be committed:
(use "git rm --cached
new file: a.txt
4)
[email protected] MINGW64 ~/PycharmProjects/user_data (master)
5)
[email protected] MINGW64 ~/PycharmProjects/user_data (master)
$ git checkout test
Switched to branch ‘test‘
6)
[email protected] MINGW64 ~/PycharmProjects/user_data (test)
$ git commit -m "test"
[test dead7b3] test
1 file changed, 0 insertions(+), 0 deletions(-)
7)
$ git status
On branch test
nothing to commit, working tree clean
8)
[email protected] MINGW64 ~/PycharmProjects/user_data (test)
$ git checkout master
Switched to branch ‘master‘
9)
[email protected] MINGW64 ~/PycharmProjects/user_data (master)
$ git merge test
Updating 8d449c4..dead7b3
Fast-forward
a.txt | Bin 8192 -> 8192 bytes
1 file changed, 0 insertions(+), 0 deletions(-)
10)
[email protected] MINGW64 ~/PycharmProjects/user_data (master)
$ git status
On branch master
nothing to commit, working tree clean
11)
[email protected] MINGW64 ~/PycharmProjects
$ mkdir bn
12)
[email protected] MINGW64 ~/PycharmProjects
$ cd bn/
13)
[email protected] MINGW64 ~/PycharmProjects/bn
$ git clone [email protected]:*/autotest.git
Cloning into ‘autotest‘...
The authenticity of host ‘github.com (...**)‘ can‘t be established.
RSA key fingerprint is SHA256:nThbg6kXUpJWGl7E1IGOCspRomTxdCARLviKw6E5SY8.
Are you sure you want to continue connecting (yes/no)?
Host key verification failed.
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
[email protected] MINGW64 ~/PycharmProjects/bn
$ git clone https://[email protected]/**/autotest.git
Cloning into ‘autotest‘...
remote: Enumerating objects: 75, done.
remote: Counting objects: 100% (75/75), done.
remote: Compressing objects: 100% (48/48), done.
remote: Total 23037 (delta 37), reused 48 (delta 23), pack-reused 22962
Receiving objects: 100% (23037/23037), 39.11 MiB | 3.83 MiB/s, done.
Resolving deltas: 100% (14252/14252), done.
Checking out files: 100% (1370/1370), done.
14)
接下來的可以在pycharm裏操作
【GIT】【命令行】