惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

S
Secure Thoughts
罗磊的独立博客
T
The Blog of Author Tim Ferriss
人人都是产品经理
人人都是产品经理
博客园 - 叶小钗
Last Week in AI
Last Week in AI
美团技术团队
Google Online Security Blog
Google Online Security Blog
Application and Cybersecurity Blog
Application and Cybersecurity Blog
D
Docker
G
Google Developers Blog
大猫的无限游戏
大猫的无限游戏
酷 壳 – CoolShell
酷 壳 – CoolShell
小众软件
小众软件
月光博客
月光博客
L
LINUX DO - 最新话题
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
W
WeLiveSecurity
H
Heimdal Security Blog
Vercel News
Vercel News
SecWiki News
SecWiki News
Forbes - Security
Forbes - Security
Blog — PlanetScale
Blog — PlanetScale
Google DeepMind News
Google DeepMind News
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
www.infosecurity-magazine.com
www.infosecurity-magazine.com
TaoSecurity Blog
TaoSecurity Blog
T
Troy Hunt's Blog
A
About on SuperTechFans
C
Check Point Blog
S
Security Affairs
Hacker News - Newest:
Hacker News - Newest: "LLM"
AI
AI
WordPress大学
WordPress大学
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
Help Net Security
Help Net Security
博客园_首页
The Last Watchdog
The Last Watchdog
S
SegmentFault 最新的问题
Hugging Face - Blog
Hugging Face - Blog
Security Archives - TechRepublic
Security Archives - TechRepublic
Engineering at Meta
Engineering at Meta
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
I
Intezer
K
Kaspersky official blog
M
MIT News - Artificial intelligence
J
Java Code Geeks
G
GRAHAM CLULEY
P
Palo Alto Networks Blog

博客园 - 星际浪子

In Theano, how to do Reverse-MaxPooling in the Convolutional MaxPooling Auto-Encoder 如何让Ubuntu中virtualbox虚拟机用上USB设备 Deep Learning Stuffs(持续更新中……) 实例描述如何用python组件ctypes调用c的dll中的函数 放弃MATLAB!简述winpython为什么比MATLAB更方便 虚拟机Ubuntu10.04无法显示windows中文目录和文件 W: GPG 错误 用debugfs挂载硬盘,删除损坏的文件 数据资源 机器学习资源 镜头的参数指标 PCA和ICA GIT diff 命令 opencv中snake的调用方法示例 偏最小二乘法回归(Partial Least Squares Regression) Linux常用几种shell Git详解-Git分支 网线连接并PPPOE拨号后无法扫描无线网络问题的解决办法 gdb 命令详细解释
GIT 常用命令手册
星际浪子 · 2012-11-09 · via 博客园 - 星际浪子

1.配置

配置操作人员名称

git config --global user.name “zm”

配置操作人员邮箱信息

git config --global user.email “zm@impower-tech.com

配置信息显示方式为彩色

git config --global color.ui true

2.本地操作

初始化git

git init #在当前目录下会创建一个.git的文件夹,以后所有的操作都会被记录在里面

将更改添加到索引库中

git add .

依据索引库中的信息将更改提交到仓库中

git commit -m “the first time commitment.”

查看最近1次的更改日志,如果想看最近3次,可以改成3

git log -1

将分支branch1合并当前分支上,如果出现冲突,那么会有提示,要自行修改去提交修改

git merge branch1

建立新分支newbranch

git branch newbranch

列出所有分支

git branch

签出分支newbranch

git checkout newbranch

创建并签出分支branch0

git checkout -b branch0

临时保存当前工作

git stash

列出所有临时保存的工作

git stash list

恢复某一个临时工作

git stash pop stash@{2}

创建里程碑1.0.0

git tag 1.0.0

将里程碑1.0.0相关的文件打包起来发布

git archive --format=zip 1.0.0 > algo1.0.0.zip

返回历史的操作reset

git reset HEAD^ #返回到前一次没有add的状态

git reset --soft HEAD^ #返回到前一次没有commit的状态

git reset --hard HEAD^ #返回到前一次状态,工作区的修改也会被同时撤消

HEAD^ #前一次提交

HEAD^^ #前两次提交

HEAD^^^ #前三次提交

SHA1_HASH #每次提交都对应着一个唯一的SHA1_HASH值。一般情况下只需输入前5项即可

注:如果你担心reset后会后悔,那么在reset前记录一下最新一次提交的SHA1_HASH值。

回到历史中某个时候并新增一条分支newbranch

git checkout SHA1_HASH

git branch newbranch

干脆一点:git checkout -b newbranch SHA1_HASH

3.远程操作

建立空远程空仓库

git init --bare

将远程的库地址用origion来命名

git remote add origion coder@192.168.0.222:algoteam/zm/algo1

拷贝一份远程的库

git clone origion

在本地创建一个新分支branch1,并将远程库中的master分支拷贝到本地的branch1分支上

git fetch origion master:branch1

将远程库中的master分支拷贝到本地的branch2分支上并进行合并,如果合并的时候发生冲突要自行进行解决

git pull origion master:branch2

将本地的branch3分支推送到远程库中branch4分支中

git push origion branch3:branch4

删除远程库的branch4分支

git push origion :branch4

将本地branch5分支推送到远程库中

git push origion branch5

将本地库所有分支推送到远程库中

git push origion --all