• git


    git的命令:

    配置用户名:git config  --global user.name '用户名'

    配置邮箱:git config --global user.email '邮箱号'

    初始化邮箱:git init 出现隐藏仓库 一次即可

    查看状态:git status  多次验证

    工作区添加到暂存区:git add 文件名  创建:touch

    暂存区到仓库: git  commit -m 'add 文件名'

    修改文件:类似于linux  vi进入  然后cat查看 继续git add  ;  git commit

    删除文件:git rm 文件名

    提交描述:git commit -m '描述'     rm 文件名

    仓库到远程仓库:先下载到本地 git clone 仓库地址(copy)然后使用命令git push

    itcastphpgitl / test 
forked from itcastphpgit2/test 
Pulse 
V 1 branch 
Graphs 
@ Unwatch 
O Settings 
Star 
O 
Fork 
1 
Code 
n Pull requests 0 
— Edit 
(D 9 commits 
Branch: master 
New pull request 
This branch is 2 commits ahead, 1 commit behind itcastphp •master. 
itcastphpgitl 
al. php logo. png php2. php REAWE.md test 3. php 
PR-35 
S touch a2. php 
R35 
s—git add a2. php 
s-git comit -m 
(mas er) 
(mas er) 
(mas er) 
README.md 
al .php 
[31 a2.php 
logo.png 
php2.php 
@ test3.php 
3. 
1 file changed, O insertions(+), O deletions (-) 
create mode 100644 a2. php 
PR-35 (mas er) 
S git push 
. 3, done. 
Delta compression using up to 4 threads. 
Compressing objects: 100% (2/2), done. 
Writing objects: 100% (3/3), 306 bytes I O bytes/ s, 
Total 3 (delta 1), reused O (delta O) 
To https://github. com/itcastphpgitl/test.git 
3182dOd.. le3532d master master 
done. 
(mas er)

    个人仓库创建过程:

    仓库名:用户名.github.io   index.html(必须.html)静态网页

     

    访问:

    https://用户名.github.io

     

    SourceTree&Git部分名词解释

    1. 克隆(clone):从远程仓库URL加载创建一个与远程仓库一样的本地仓库
    2. 提交(commit):将暂存文件上传到本地仓库(我们在Finder中对本地仓库做修改后一般都得先提交一次,再推送)
    3. 检出(checkout):切换不同分支
    4. 添加(add):添加文件到缓存区
    5. 移除(remove):移除文件至缓存区
    6. 暂存(git stash):保存工作现场
    7. 重置(reset):回到最近添加(add)/提交(commit)状态
    8. 合并(merge):将多个同名文件合并为一个文件,该文件包含多个同名文件的所有内容,相同内容抵消
    9. 抓取(fetch):从远程仓库获取信息并同步至本地仓库
    10. 拉取(pull):从远程仓库获取信息并同步至本地仓库,并且自动执行合并(merge)操作,即 pull=fetch+merge
    11. 推送(push):将本地仓库同步至远程仓库,一般推送(push)前先拉取(pull)一次,确保一致
    12. 分支(branch):创建/修改/删除分枝
    13. 标签(tag):给项目增添标签
    14. 工作流(Git Flow):团队工作时,每个人创建属于自己的分枝(branch),确定无误后提交到master分枝
    15. 终端(terminal):可以输入git命令行

  • 相关阅读:
    Socket与系统调用深度分析
    需求分析:未来的图书会是怎么样的?
    构建调试Linux内核网络代码的环境MenuOS系统
    jmeter--开始
    pytest---api
    pytest---mark
    pytest---数据处理
    pytest---fixture运行规则
    pytest---allure(mac版本)
    pytest---pytest.ini
  • 原文地址:https://www.cnblogs.com/Z-D-/p/7130425.html
Copyright © 2020-2023  润新知