上传代码到gitee操作
生活随笔
收集整理的這篇文章主要介紹了
上传代码到gitee操作
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
上傳代碼到gitee操作
- 一、查看本地倉庫狀態
- 1.查看本地倉庫狀態
- 2.查看本地工作區狀態
- 二、Git 全局設置
- 三、無本地倉庫和本地代碼時
- 四、已有本地git倉庫時
一、查看本地倉庫狀態
1.查看本地倉庫狀態
[root@k8s-master rege_git]# git log --oneline 21b8da9 (HEAD -> master, tag: V1.0, origin/master) 7.0-master hebing file xiaowu.txt 971127e 6.0-mster create a xiaowu.txt && xiaowu 6666 8f95061 (origin/xiaowu, xiaowu) 5.0-xiaowu create a xiaowu.txt 6a28554 4.0-lisi crate file lisi.txt 2d7bee4 2.0 create a stash.txt ebc7eb6 1.0-create the file2.查看本地工作區狀態
[root@k8s-master rege_git]# git status On branch master Your branch is up to date with 'origin/master'.nothing to commit, working tree clean二、Git 全局設置
root@k8s gitlab]# useradd zhangsan [root@k8s gitlab]# passwd zhangsan Changing password for user zhangsan. New password: BAD PASSWORD: The password fails the dictionary check - it is too simplistic/systematic Retype new password: passwd: all authentication tokens updated successfully. [root@k8s gitlab]# su - zhangsan三、無本地倉庫和本地代碼時
mkdir test cd test git init touch README.md git add README.md git commit -m "first commit" git remote add origin git@gitee.com:zhangsan/test.git git push -u origin "master"四、已有本地git倉庫時
cd existing_git_repo # 進入本地git倉庫 git remote add origin git@gitee.com:zhangsan/test.git # 連接到遠程倉庫 git push -u origin "master" #上傳主分支代碼 git push -u origin --all #上傳全部代碼總結
以上是生活随笔為你收集整理的上传代码到gitee操作的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: Linux上的gitlab日常操作
- 下一篇: containerd和docker技术的