当前位置: 代码迷 >> 综合 >> git 初始化项目 push项目到github中去 pull github中项目 到本地工作区中
  详细解决方案

git 初始化项目 push项目到github中去 pull github中项目 到本地工作区中

热度:87   发布时间:2023-12-02 04:55:11.0
@DESKTOP-MT3AS98 MINGW32 /e/gitea/test
一、$ git init
Initialized empty Git repository in E:/gitea/test/.git/@DESKTOP-MT3AS98 MINGW32 /e/gitea/test (master)
二、$ touch readme.txt@DESKTOP-MT3AS98 MINGW32 /e/gitea/test (master)
三、$ ls
readme.txt@DESKTOP-MT3AS98 MINGW32 /e/gitea/test (master)
四、$ git add *@DESKTOP-MT3AS98 MINGW32 /e/gitea/test (master)
五、$ git commit -m "初始化"
[master (root-commit) 2953f96] 初始化1 file changed, 0 insertions(+), 0 deletions(-)create mode 100644 readme.txt@DESKTOP-MT3AS98 MINGW32 /e/gitea/test (master)
六、 $ git remote add origin git@github.com:dq095/learngit.git@DESKTOP-MT3AS98 MINGW32 /e/gitea/test (master)
七、$ git push origin master
Counting objects: 3, done.
Writing objects: 100% (3/3), 213 bytes | 71.00 KiB/s, done.
Total 3 (delta 0), reused 0 (delta 0)
remote:
remote: Create a pull request for 'master' on GitHub by visiting:
remote:      https://github.com/dq095/learngit/pull/new/master
remote:
To github.com:dq095/learngit.git* [new branch]      master -> master@DESKTOP-MT3AS98 MINGW32 /e/gitea/test (master)
八、$ git pull origin master
Warning: Permanently added the RSA host key for IP address '13.250.177.223' to the list of known hosts.
From github.com:dq095/learngit* branch            master     -> FETCH_HEAD
Already up to date.@DESKTOP-MT3AS98 MINGW32 /e/gitea/test (master)
九、$ git pull origin master
remote: Enumerating objects: 4, done.
remote: Counting objects: 100% (4/4), done.
remote: Compressing objects: 100% (2/2), done.
remote: Total 3 (delta 0), reused 0 (delta 0), pack-reused 0
Unpacking objects: 100% (3/3), done.
From github.com:dq095/learngit* branch            master     -> FETCH_HEAD2953f96..a6b2387  master     -> origin/master
Updating 2953f96..a6b2387
Fast-forwarda.txt | 1 +1 file changed, 1 insertion(+)create mode 100644 a.txt@DESKTOP-MT3AS98 MINGW32 /e/gitea/test (master)
$
  相关解决方案