zoukankan      html  css  js  c++  java
  • git创建远程项目并进行代码管理及相关命令

    1.windows下载Git     https://git-scm.com/downloads

    然后一路点击安装

    2.登录github,点击右上角创建仓库

    3.在本地项目根目录下 输入如下命令

    ssh-keygen -t rsa -C "2020956572@qq.com"             #本地生成.ssh文件,提示输入 默认路径,然后输入密码,确认密码

    在github上进入后,

    添加公钥,这样才能提交代码成功

    接着输入如下命令即可

    git init

    git add *

    git commit -m 'first commit'

    git remote add origin https://github.com/YouGitName/djan.git

    git push -u origin master

    其他命令

    git rm -rf file   # 删除文件或文件夹

    git clone ****.git #拉取远程项目到本地

    git branch #查看所有分支,及当前分支

    git checkout master #切换到master分支

    git checkout -b hhhh master  #拉取远程分支并创建本地分支

    git merge dev #把dev分支的代码合并到本分支

    git pull origin master #把远程master分支拉取到本地

    git log #查看日志

    git reset --hard #强行把版本更新到最新版本,然后 执行 git pull

    git --help #查询帮助信息

    其他git的使用,包括 git commit 规范,工作流,windows系统的使用及工具Vscode的使用等,请查看下载如下链接;

    https://github.com/Rgcsh/Knowledge/tree/master/other_file 里的git_use.xlsx 文件

  • 相关阅读:
    湖湘杯2020misc
    BUUOJ(Misc)
    BUUOJ(Web)
    网络信息安全攻防学习平台
    CTFHub web部分题解
    BugkuCTF 部分WP(搬运了很多WP)
    Web安全之机器学习入门 第2章-第5章学习笔记
    结构体
    排序的使用
    字符串和日期
  • 原文地址:https://www.cnblogs.com/rgcLOVEyaya/p/RGC_LOVE_YAYA_810days_1.html
Copyright © 2011-2022 走看看