Skip to Content
可编程网络自动化
book

可编程网络自动化

by Jason Edelman, Scott S. Lowe, Matt Oswalt
January 2023
Intermediate to advanced
458 pages
14h 16m
Chinese
Posts & Telecom Press
Content preview from 可编程网络自动化
使用
Git
控制源代码
277
7.
向共享仓库推送变更
你现在已经有了裸仓库,可以使用
git push
向远程仓库推送变更了。该命令的一般语法为
git push remote branch
,其中,
remote
Git
远程仓库名称,
branch
为应该将变更推送至
的分支名称。
为了演示命令的实际操作,我们会对
Debian
系统中的网络自动化仓库进行一些变更,加入
Jinja
模板
hv-tor
-config.j2
,该模板描述了与
hypervisor
所连接的架顶式交换机的基础配置。
因为不想脱离
master
分支,所以我们新建了一个分支来保存变更。
vagrant@jessie:~/na-shared$
git checkout -b add-sw-tmpl
Switched to a new branch 'add-sw-tmpl'
vagrant@jessie:~/na-shared$
向工作目录中添加文件(新建或者从其他地方复制)之后,暂存并提交变更。
vagrant@jessie:~/na-shared$
git add hv-tor-config.j2
vagrant@jessie:~/na-shared$
git commit -m "Add Jinja template for TOR config"
[add-sw-tmpl 8cbbe6f] Add Jinja template for TOR config
1 file changed, 15 insertions(+)
create ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Python和NLTK实现自然语言处理

Python和NLTK实现自然语言处理

Posts & Telecom Press, Nitin Hardeniya
Go程序设计语言

Go程序设计语言

艾伦A. A.多诺万, 布莱恩W. 柯尼汉
弱监督学习实用指南

弱监督学习实用指南

Wee Hyong Tok, Amit Bahree, Senja Filipi
Python实用技能学习指南

Python实用技能学习指南

Posts & Telecom Press, Robert Smallshire, Austin Bingham

Publisher Resources

ISBN: 9787115606181