/README.md (2e732476b405ff5ffa31f837dea4ca475874c846) (4408 bytes) (mode 100644) (type blob)

###################################

创建仓库后先设置admin:
Edit  Repo rights    Refs rights      Path rights   Delete   Lock
编辑  回购权         参考资料权利     道路权        删除     锁定
edit编辑,名随便,  Public or private可设公开或私人,默认为公开,设private为私人。  下边随便 建立。
Repo rights在设置授予回购权:用户使用“自己用户”全部。
Refs rights重要:裁判权:用户使用“*”全部.
Path rights路径:用户使用“*”全部. 

在主页设置ssh密钥,在设置 登录令牌。(已有仓库设置过就不用设置了)

###################################
在项目上打开自己的 Git Bash Here ,然后输入git config --system --unset credential.helper,退出之后重新拉取项目
执行命令之后,再次pull或push时会缓存输入的用户名和密码:
git config --global credential.helper store
###################################
################################################
#git pull --rebase origin main#先取消掉本地库中刚刚的commit,在pull合并代码设置。然后再进行push即可
###################################成功
清除git缓存中的用户名的密码
git credential-manager uninstall
在第一次提交之前,不要忘记设置你的 git 环境:
git config --global user.name "xxx"
git config --global user.email "xxx@qq.com"
ssh-keygen -t rsa -C xxx@qq.com
cat ~/.ssh/id_rsa.pub
###################################
如果您本地没有该项目,并且想要克隆它:克隆 转到 创建分支
git clone https://rocketgit.com/user/dongge/admin admin && cd admin && git checkout -b main

#git init --initial-branch main --object-format sha1
#git reset --hard d32d7c49af9203f3ebc414d5f73a38c00b0d4c13 #彻底删除版本库git reset --hard ca7719755e77a7c30500d7d1854c255769e13322
#git rm -r --cached . ##git checkout HEAD~1#取消上2次提交git reset HEAD~2#转到git checkout main#


git add . && git commit -m 'xxxx' --no-verify  &&  git push origin main
git remote add origin https://rocketgit.com/user/dongge/m2

###################################
#git checkout -b main #创建分支改为远程的main#git branch -m 旧名称 新名称:git branch -m master main##转到分支git checkout main
#输入用户名dongge 二次验证密钥     git push -uf origin main:18#强制覆盖上传
git push origin master## git push -u origin main ## git push -uf origin master:main ##git push -u origin master:master
git push origin master ##git push -u origin master  ###git push origin main:master ###git push -f就可以强制推送
git push -f origin main ## git push -u origin master -f  #强制覆盖原有的分支git push -uf origin master

删除远程分支:git push origin --delete master
###################################
git pull --rebase origin master#push后,在pull合并同步代码设置。然后再进行下一次push即可

##########################################################
官方推送步骤:
##git status 删除未推送缓存里的文件如: git rm --cache m/lib/fan.txt

git pull --rebase origin main#代码和并
git commit --amend -m 'OCT: 删除无用变量代码'
git remote rm origin ##先删除远程 Git 仓库
git remote add origin https://rocketgit.com/user/dongge/m1
#########################################################
git branch -a
获取所有的列表,然后切换到需要删除的分支:git checkout main
最后删除该分支:git push origin --delete main
git撤销合并错误分支
方法1. git reset -hard commit_id
方法2. gitrevert-m 1 branch_name reset:
克隆指定分支:git clone -b 分支名称 http://xxxxxxx.git



删除远程分支aaaa
我比较喜欢的简单方式,推送一个空分支到远程分支,其实就相当于删除远程分支:
$ git push origin :aaaaaa
也可以使用:
$ git push origin --delete aaaaaa
########################################################
命令行 Git 客户端不会立即记住您的凭据。确保您运行的是 Git 版本 1.7.12.1 或更高版本,然后使用以下命令启用密码缓存:
git config --global credential.helper cache
这将使 git 在您输入凭据后 15 分钟内记住您的凭据。要增加该限制,请使用以下命令并指定时间(以秒为单位):

git config --global credential.helper 'cache --timeout=3600'

###################################


Mode Type Size Ref File
100644 blob 768 23db718de9523cae8e427bde9bae19b26a66111f 18+.txt
100644 blob 4408 2e732476b405ff5ffa31f837dea4ca475874c846 README.md
Hints:
Before first commit, do not forget to setup your git environment:
git config --global user.name "your_name_here"
git config --global user.email "your@email_here"

Clone this repository using HTTP(S):
git clone https://rocketgit.com/user/dongge/admin

Clone this repository using ssh (do not forget to upload a key first):
git clone ssh://rocketgit@ssh.rocketgit.com/user/dongge/admin

Clone this repository using git:
git clone git://git.rocketgit.com/user/dongge/admin

You are allowed to anonymously push to this repository.
This means that your pushed commits will automatically be transformed into a merge request:
... clone the repository ...
... make some changes and some commits ...
git push origin main