当前位置: 首页 > article >正文

Gogs 创建新的仓库并提交代码

Gogs 创建新的仓库并提交代码

  • 1. 登录
  • 2. 仓库 -> 我的仓库
  • 3. + 创建新的仓库
  • 4. 仓库
  • 5. Copy
  • 6. 公开代码
  • ​7. 提交成功 Gogs - git
  • References

Gogs 是一款极易搭建的自助 Git 服务。

1. 登录

在这里插入图片描述

2. 仓库 -> 我的仓库

在这里插入图片描述

3. + 创建新的仓库

在这里插入图片描述

4. 仓库

在这里插入图片描述

5. Copy

在这里插入图片描述

6. 公开代码

strong@foreverstrong:~/gogsgit_work$ pwd
/home/strong/gogsgit_work
strong@foreverstrong:~/gogsgit_work$
 
strong@foreverstrong:~/gogsgit_work$ git clone http://******/PyTorch-Examples.git
Cloning into 'PyTorch-Examples'...
remote: Counting objects: 5, done.
remote: Compressing objects: 100% (5/5), done.
remote: Total 5 (delta 0), reused 0 (delta 0)
Unpacking objects: 100% (5/5), done.
Checking connectivity... done.
strong@foreverstrong:~/gogsgit_work$ ls
PyTorch-Examples
strong@foreverstrong:~/gogsgit_work$ cd PyTorch-Examples/
strong@foreverstrong:~/gogsgit_work/PyTorch-Examples$ ls
LICENSE  README.md
strong@foreverstrong:~/gogsgit_work/PyTorch-Examples$ 
strong@foreverstrong:~/gogsgit_work/PyTorch-Examples$ ls
foreverstrong.txt  LICENSE  README.md
 
strong@foreverstrong:~/gogsgit_work/PyTorch-Examples$ git status
On branch master
Your branch is up-to-date with 'origin/master'.
Untracked files:
  (use "git add <file>..." to include in what will be committed)
 
	foreverstrong.txt
 
nothing added to commit but untracked files present (use "git add" to track)
strong@foreverstrong:~/gogsgit_work/PyTorch-Examples$ 
strong@foreverstrong:~/gogsgit_work/PyTorch-Examples$ git branch
* master
 
strong@foreverstrong:~/gogsgit_work/PyTorch-Examples$ 
strong@foreverstrong:~/gogsgit_work/PyTorch-Examples$ git add .
strong@foreverstrong:~/gogsgit_work/PyTorch-Examples$ 
strong@foreverstrong:~/gogsgit_work/PyTorch-Examples$ git status
On branch master
Your branch is up-to-date with 'origin/master'.
Changes to be committed:
  (use "git reset HEAD <file>..." to unstage)
 
	new file:   foreverstrong.txt
 
strong@foreverstrong:~/gogsgit_work/PyTorch-Examples$ 
 
strong@foreverstrong:~/gogsgit_work/PyTorch-Examples$ git commit -m "Hello World!"
[master 9c02bff] Hello World!
 1 file changed, 2 insertions(+)
 create mode 100644 foreverstrong.txt
strong@foreverstrong:~/gogsgit_work/PyTorch-Examples$ ls
foreverstrong.txt  LICENSE  README.md
strong@foreverstrong:~/gogsgit_work/PyTorch-Examples$ git status
On branch master
Your branch is ahead of 'origin/master' by 1 commit.
  (use "git push" to publish your local commits)
nothing to commit, working directory clean
strong@foreverstrong:~/gogsgit_work/PyTorch-Examples$ 
strong@foreverstrong:~/gogsgit_work/PyTorch-Examples$ git log
commit 9c02bff5ff1cb5224c384ccd1bf63585c3a9f365
Author: chengyq116 <chengyq116@163.com>
Date:   Tue Jun 26 20:52:14 2018 +0800
 
    Hello World!
 
commit a8474765709505de1ce0ffe7fff58e91e1ebd9ab
Author: chengyq116 <chengyq116@163.com>
Date:   Tue Jun 26 12:05:28 2018 +0000
 
    Initial commit
 
strong@foreverstrong:~/gogsgit_work/PyTorch-Examples$ git push
warning: push.default is unset; its implicit value has changed in
Git 2.0 from 'matching' to 'simple'. To squelch this message
and maintain the traditional behavior, use:
 
  git config --global push.default matching
 
To squelch this message and adopt the new behavior now, use:
 
  git config --global push.default simple
 
When push.default is set to 'matching', git will push local branches
to the remote branches that already exist with the same name.
 
Since Git 2.0, Git defaults to the more conservative 'simple'
behavior, which only pushes the current branch to the corresponding
remote branch that 'git pull' uses to update the current branch.
 
See 'git help config' and search for 'push.default' for further information.
(the 'simple' mode was introduced in Git 1.7.11. Use the similar mode
'current' instead of 'simple' if you sometimes use older versions of Git)
 
Counting objects: 3, done.
Delta compression using up to 8 threads.
Compressing objects: 100% (2/2), done.
Writing objects: 100% (3/3), 307 bytes | 0 bytes/s, done.
Total 3 (delta 1), reused 0 (delta 0)
Username for 'http://******': ******@163.com
Password for 'http://******': 
To http://******/PyTorch-Examples.git
   a847476..9c02bff  master -> master
strong@foreverstrong:~/gogsgit_work/PyTorch-Examples$ 
strong@foreverstrong:~/gogsgit_work/PyTorch-Examples$ git log
commit 9c02bff5ff1cb5224c384ccd1bf63585c3a9f365
Author: chengyq116 <chengyq116@163.com>
Date:   Tue Jun 26 20:52:14 2018 +0800
 
    Hello World!
 
commit a8474765709505de1ce0ffe7fff58e91e1ebd9ab
Author: chengyq116 <chengyq116@163.com>
Date:   Tue Jun 26 12:05:28 2018 +0000
 
    Initial commit
strong@foreverstrong:~/gogsgit_work/PyTorch-Examples$ 

​7. 提交成功 Gogs - git

在这里插入图片描述

References

[1] Yongqiang Cheng, https://yongqiang.blog.csdn.net/


http://www.kler.cn/a/271791.html

相关文章:

  • Linux 4.19内核中的内存管理:x86_64架构下的实现与源码解析
  • DeepSeek能够进行逻辑推理吗?
  • 马尔科夫模型和隐马尔科夫模型区别
  • TCP是怎么判断丢包的?
  • 大数据Hadoop入门3
  • AndroidCompose Navigation导航精通2-过渡动画与路由切换
  • 链式二叉树--前序中序后序遍历,高度,节点个数问题
  • MyFileServer
  • 口腔管理平台 |基于springboot框架+ Mysql+Java+B/S结构的口腔管理平台 设计与实现(可运行源码+数据库+lw文档)
  • 唯一约束
  • PCM和I2S区别
  • 快速去除或提取视频中的任何声音,你学会了吗
  • linux解析域名指令 nslookup 或者 host
  • C++:菱形继承与虚继承
  • 数据分析 | NumPy
  • 爬虫的基本原理介绍,实现以及问题解决
  • Linux——线程池
  • C/C++整数和浮点数在内存中存储
  • Linux学习(4)——使用编辑器
  • 第十三届蓝桥杯省赛C++ C组《全题目+题解》
  • Xlua - 集成rapidjson(json序列化)
  • 力扣111---二叉树的最小深度(简单题,Java,递归+非递归)
  • 用户数据的FLASH存储与应用(FPGA架构)
  • matlab去除图片上的噪声
  • SpringBoot整合异步任务
  • unity3d Animal Controller的Animal组件中Stances,Advanced基础部分理解