原文:http://stackoverflow.com/questions/8196544/what-are-the-git-concepts-of-head-master-origin
I highly recommend the book "Pro Git" by Scott Chacon. Take time and really read it, while exploring an actual git repo as you do.
HEAD: the current commit your repo is on. Most of the time HEAD
points to the latest commit in your branch, but that doesn't have to be the case. HEAD
really just means "what is my repo currently pointing at". Thanks svick for the heads up on this one (no pun intended)
In the event that the commit HEAD
refers to is not the tip of any branch, this is called a "detached head".
master: The name of the default branch that git creates for you when first creating a repo. In most cases, "master" means "the main branch". Most shops have everyone pushing to master, and master is considered the definitive view of the repo. But it's also common for release branches to be made off of master for releasing. Your local repo has its own master branch, that almost always follows the master of a remote repo.
origin: The default name that git gives to your main remote repo. Your box has its own repo, and you most likely push out to some remote repo that you and all your coworkers push to. That remote repo is almost always called origin, but it doesn't have to be.
HEAD
is an official notion in git, HEAD
always has a well defined meaning. master
and origin
are common names usually used in git but they don't have to be.
相关推荐
F: Fetch origin/master and merge. L: Show latest two-weeks logs of repository. P: Push commissions to origin/master. U: User command mode(Press ‘Enter’ to exit). R: Reset current version ...
最好将以前的数据保存在本地而不删除历史记录并再次推送获取提交ID git log/*commit ee89100ff5b26bf97113b14851e3d48e2b7f0c4c (HEAD -> master, origin/master)Author: TakuyaTaniguchiDate: Wed Feb 26 11:49:19 ...
git push -u origin master 推送代码到远程仓库 git push origin <当前分支> 撤销修改 丢弃工作区的修改 git checkou -- file 丢弃添加到暂存区的修改 git reset HEAD git checkout -- file 丢弃已经提交到...
origin/master && git clean -f -d 1次提交中所有文件的列表 git ls-tree --name-only -r < commit-ish > Git重置第一次提交 git update-ref -d HEAD 已冲突的所有文件的列表 git diff --name-only --diff-filter...
(提交到本地参考的head版本,引号里面的是注释) 3.项目提交服务器 git push -u origin master 项目合并 git merge origin master git项目关联 git remote add origin github.com/hongjinlong/fly.git 查看...
头先的java 一本用于学习Java基础知识的温和书籍 这是一个很好的起点,没有什么比对学习Java的Sedgewick更好。 嘘。 我想学的东西: 面向对象的程序设计结构 ...git push origin master -u将导致g
凯捷 ...git push origin master / main->将所有数据从本地文件夹推送到git rep git init->初始化git git添加文件名->添加文件 git add -A->添加所有文件 git difftool Head-> diff黑白本地ana工作区
git fetch git diff origin / master git merge origin三个步骤分别代表:获取远程仓库至本地,保存版本号至.git / FETCH_HEAD;比较远程origin / master与本地分散;将远程origin / master merge至本地仓库。与...
Git 详细介绍查看、删除、重命名远程分支和tag 1. 查看远程 分支加上-a参数可以查看远程分支,远程分支会用红色表示出来: xiaosi@Qunar:~/code/qtown-score$ git branch -a ... remotes/origin/HEAD ->
命令:git merge remotes/origin/master 其它常用功能: 查看文件修改记录 查看简单提交记录 git log --pretty=oneline fileName 查看详细提交记录 git log -p fileName 查看每一行提交 git blame fileName git diff...
git add 时间段检索.txt git commit -m "时间检索" git push origin HEAD:refs/for/master
HEAD git commit -m "note" git pull origin master git push origin master [TOC] 1.软件安装 1.1 常用软件 1.2 深度学习环境 [Ubuntu16.04 TensorFlow](软件安装//Ubuntu16.04 TensorFlow...
仍然存在当您将默认分支名称... Remained运行以下命令,这些命令与GitHub重命名默认分支时告诉您的命令相同:git branch -m master maingit fetch origingit branch -u origin/main maingit remote set-head origin -a
太空侵略者 这是我将在“拉什俱乐部”获得的“太空侵略者”演示的资料库 如何使用: 分叉存储库 ...git fetch origin master git reset --hard FETCH_HEAD git clean -df 从那里,您可以将存储库添加
zsh-abbrev-alias 该zsh插件提供的功能类似于Vim的缩写扩展。 该插件查询了 。 有关bash版本,请参见 。 安装 使用 zplug " momo-lab/zsh-abbrev-alias " ...$ git push origin master $ abbrev-
提交表情符号 使用随机表情符号消息执行git commit。... 8aef17e (HEAD -> master, origin/master) :call_me_hand: 0659d3c :blue_heart: dfcfa23 :rocket: 执照 麻省理工学院:copyright: 通过支持我的OSS工作
运行以下命令以更新本地克隆: git branch -m master maingit fetch origingit branch -u origin/main maingit remote set-head origin -入门yarn add rsrc用法import React from "react" ;import { Resource } ...
描述 这些是模块/命令,用于日常 qa 任务。 请首先安装 ,然后将此 repo 文件添加到您的 Skype 机器人。 每个命令都有自己的帮助,用户可以阅读简短的手册。...John Galt - (HEAD, origin/master, mas
QT写的串口上位机,利用串口通讯来控制机器。...commit 8cf299938baca995af59aca2c4d60e1bafe49838 (HEAD -> master, origin/master) Date: Thu Apr 27 10:21:42 2023 +0800 #20230427-01# Backup
我们使用以下git命令确定更改的赛普拉斯规格(在检出head和base分支之后) git diff --name-only \ origin/ ${{ github.base_ref } } origin/ ${{ github.head_ref } } -- cypress/integration 然后,如果返回了...