手记

【金秋打卡】第1天 Git小白学习笔记

本篇想法来自python工程师 git入门篇 -讲师姓名 -??


操作环境 -Github 和 英文Sourcetree介面 (供想使用英文环境的人参考)


介绍Git GUI -SourceTree



Git 远端创建 -两种 https: 使用帐密(新手友好, 本篇介绍) vs. ssh(使用密钥, 感兴趣的童鞋上网找找)


複制https -連接 -介绍常見指令和操作及意涵

connect remote-local

SSH: use authentication to log in


Clone: Connect remote to local  

Add: Add local to remote

Push: 下拉commit選項 -create pull request

Pull(拉取): From remote to local -Case: 如果在远端修改需更新到本地时


分支(branch) -隔离不同开发者间的代码

切换分支 -双击分支(branch)


合併分支 -切换到”想合併的分支”(双击)

  (单击)”要被合併的分支”右键选择merge (Merge branch to current branch) 

回滚提交 -reverse commit -回退到之前的版本


当遇到回滚错误, 合併衝突 -则在将要的回滚状态上单击选择reset current branch to this commit

Conflict (衝突)标示:

<<<< HEAD (conflict head)

….

====== (conflict end)

Solution: reset current branch并删除衝突与不需要部分即可


删除分支(delete branch) -记住: 工作分支(双击后分支)不能是当前分支(单击分支) -会遇到error “error: Cannot delete branch []”




1人推荐
随时随地看视频
慕课网APP