手机版 | 登陆 | 注册 | 留言 | 设首页 | 加收藏
当前位置: 网站首页 > 全国各地自考信息 > 软考 > 文章 当前位置: 软考 > 文章

git项目操作备忘gitcode github

时间:2026-04-28    点击: 次    来源:网络    作者:佚名 - 小 + 大

git config --global user.name "weixin_40220242"git config --global user.email "newdf@126.com"cd D:\x86指令编译器模拟机git initgit remote set-url origin https://weixin_40220242:你的个人口令@gitcode.com/weixin_40220242/x86asm.gitgit add .git commit -m "Initial commit"git branch -m maingit push -u origin main当前项目代码仓是空仓库你可以通过克隆仓库开始或使用以下方式为你的项目添加文件:https://gitcode.com/weixin_40220242/web.git或为你的项目添加以下文件:添加 README.md添加 LICENSE添加 .gitignore命令行指引以下是一些常用操作的 Git 命令,你可以参照这些命令在电脑本地进行对应操作Git 全局设置git config --global user.name "weixin_40220242"git config --global user.email "newdf@126.com"创建一个新仓库git clone https://gitcode.com/weixin_40220242/web.gitcd webecho "# web" >> README.mdgit add README.mdgit commit -m "add README"git branch -m maingit push -u origin main推送现有的文件cd existing_foldergit initgit remote add origin https://gitcode.com/weixin_40220242/web.gitgit add .git commit -m "Initial commit"git branch -m maingit push -u origin main推送现有的 Git 仓库cd existing_repogit remote rename origin old-origingit remote add origin https://gitcode.com/weixin_40220242/web.gitgit push -u origin --allgit push -u origin --tags五、后续修改更新(日常只用这 3 行)后续改完代码,在项目目录右键打开 Git Bash:bash运行git add .git commit -m "更新内容描述"git push一次性把 GitCode 传到 GitHubhttps://github.com/newdf/CODEhttps://github.com/newdf/CODE.git# 1. 从 GitCode 克隆到本地(如果已有本地库可跳过)git clone https://gitcode.com/你的用户名/你的项目.gitcd 你的项目# 2. 添加 GitHub 为新远程(别名 github)git remote add github https://github.com/newdf/CODE.git# 3. 推送到 GitHub 主分支git push github main

上一篇:高等数学(工本)核心知识点汇总

下一篇:数学大类

备案ICP编号  |   QQ:285250603  |  地址:湛江市  |  电话:15322199012  |  
Copyright © 2026 天人文章管理系统 版权所有,授权www.yajiupc.top使用 Powered by 55TR.COM