branch

deleting remote branch does not remove from GitHub

♀尐吖头ヾ 提交于 2020-01-13 04:29:39
问题 I have a local branch, say hotfix . I put it up on GitHub using $ git push -u origin hotfix Then after merging the branch, I want to delete it. So I type $ git branch -d hotfix which deletes the branch locally. However, the remote branch is still on GitHub. Of course when I look at my remote branches, $ git branch -r origin/HEAD -> origin/master origin/hotfix origin/master hotfix is still there. So then I try $ git branch -r -d origin/hotfix $ git branch -r origin/HEAD -> origin/master origin

git rebase branch with all subbranches

烈酒焚心 提交于 2020-01-12 00:45:19
问题 is it possible to rebase a branch with all it's subbranches in git? i often use branches as quick/mutable tags to mark certain commits. * master * * featureA-finished * * origin/master now i want to rebase -i master onto origin/master , to change/reword the commit featureA-finished^ after git rebase -i --onto origin/master origin/master master , i basically want the history to be: * master * * featureA-finished * (changed/reworded) * origin/master but what i get is: * master * * (same

初识Git

生来就可爱ヽ(ⅴ<●) 提交于 2020-01-11 15:58:03
一 安装Git 配置用户名及邮箱 git config --global $ git config --global user.name "Your Name" $ git config --global user.email "email@example.com" 二 创建版本库 新建目录 $ mkdir learngit $ cd learngit 版本库初始化 $ git init Initialized empty Git repository in /Users/michael/learngit/.git/ 添加文件到暂存区 $ git add readme.txt 提交文件到仓库 $ git commit -m "wrote a readme file" 查看状态 $ git status # On branch master # Changes not staged for commit: # (use "git add <file>..." to update what will be committed) # (use "git checkout -- <file>..." to discard changes in working directory) # # modified: readme.txt # no changes added to commit

Error with git: remote HEAD is ambiguous, may be one of the following

旧城冷巷雨未停 提交于 2020-01-11 10:47:10
问题 After branching and pushing to the remote, a git remote show origin gives the report HEAD branch (remote HEAD is ambiguous, may be one of the following): master otherbranch What does the imply? It is a critical error? remote origin Fetch URL: gituser@local.repos.cc:/home/gituser/repos/csfsconf.git Push URL: gituser@local.repos.cc:/home/gituser/repos/csfsconf.git HEAD branch (remote HEAD is ambiguous, may be one of the following): master otherbranch 回答1: You can see the same warning in this

Is there any way to exclude branches from showing in GitK?

爷,独闯天下 提交于 2020-01-11 05:16:12
问题 Sometimes when I use GitK there's a load of commits on branches I'm not concerned with and they tend get in the way of what I'm doing. It would be nice to be able to specify which branches I want, or specify which branches I want to exclude. Is this possible? 回答1: You can specify which branches you want by specifying them as arguments to the gitk command. I'm assuming that you're already using --all , but you might be interested to know that there's also a --not flag...although it has some

哈工大软件过程与工具

给你一囗甜甜゛ 提交于 2020-01-11 00:30:59
12.23 快考试了,要开始复习了。这学期学分绩还是比较重要的。加油,奥力给 一给洛!! 大纲: 1. 软件过程核心思想 软件工程的两个映射 概念映射:问题空间的概念和解空间的模型化概念之间的映射 业务逻辑映射:问题空间的处理逻辑与解空间处理逻辑之间的映射 软件工程所关注的对象 产品 过程 软件工程所关注的目标 软件工程的核心思想: 分治,复用,折中,演化 软件过程模型 1. 瀑布模型 2. 增量模型 3.演化模型 快速原型法: 包括抛弃式原型和演化式原型 螺旋式模型 敏捷方法 极限编程:一种应用最广泛的敏捷开发模型 敏捷模型与其它模型的分析 软件项目管理 软件开发团队的组织方式 一窝蜂模式 :没有明确分工,存活的时间一般都不长 **主治医生模式:**一个人带着其它人干 明星模式: 社区模式 :linux操作系统的社区 交响乐团模式 :门类齐全,各司其职 爵士乐模式: : 功能团队模式: 官僚模式: 产品结构分解 : 项目管理里通常使用产品结构分解作为产品分解的工具 产出物:项目结束时需要提交的最终产品,在项目之初就可以准确预计 项目关注的四方面: 范围,时间,成本,质量 项目管理的主要任务: 可行性分析,进度安排,分线管理,质量管理,项目跟踪与控制 可行性分析与估算: 在项目开始之前,至少i要预估: 需要多少工作量 需要多少时间 需要多少人员 从而得出该项目是否可行 确定范围 :

Git 基础命令

我们两清 提交于 2020-01-10 22:25:30
新建代码库 #在当前目录新建一个 git 代码库 $ git init #新建一个目录,将其初始化为 git 代码库 $ git init [project-name] #下载一个项目和它的整个代码历史 $ git clone [url] 全局配置和项目配置 git 的设置文件为 .gitconfig ,它可以在用户主目录下(全局配置),也可以在项目目录下(项目配置) #显示当前 git 配置 $ git config --list #编辑 git 配置文件 $ git config -e [--global] #设置提交代码时的用户信息 $ git config [--global] user.name "[name]" $ git config [--global] user.email "[email address]" 增加/删除文件 #添加指定文件到暂存区 $ git add [file1] [file2] ... #添加指定目录到暂存区,包括子目录 $ git add [dir] #添加当前目录的所有文件到暂存区 $ git add . #删除工作区文件,并且将这次删除放入到暂存区 $ git rm [file1] [file2] ... #停止追踪指定文件,但该文件会保留在工作区 $ git rm --cached [file] #改名文件,并将这个改名放入暂存区 $

gitbash个性化设置显示的前缀

…衆ロ難τιáo~ 提交于 2020-01-10 14:40:44
gitbash命令行前缀个性化设置 设置步骤 先看最终显示效果 [ magiccube.git@Elvis:magiccube ] ( develop ) $ ##显示的字段解释: [ { git库名称 } @ { git.congfig.user.name } : { 当前文件夹目录名称 } ( { 分支名称 } ) ] 设置步骤 编辑.bashrc文件 vim ~/.bashrc 在该文件中添加如下代码 function git_branch { branch = " ` git branch 2 > /dev/null | grep "^\*" | sed -e "s/^\*\ //" ` " if [ " ${branch} " != "" ] ; then if [ " ${branch} " = "(no branch)" ] ; then branch = "( ` git rev-parse --short HEAD ` ...)" fi echo "( $branch )" fi } #显示目录 function get_pwd { # echo `pwd`; #获取远程代码库名称 git_url = " ` git remote get-url origin 2 > /dev/null ` " if [ " ${git_url} " != "" ] ; then

Clearing special permissions from folders in a branch

南楼画角 提交于 2020-01-09 10:30:08
问题 We're a fairly large project with a single trunk branch. Most of it uses the default permissions, but a few folders have custom permissions - say, only "Builders" group is allowed to check-in. We want to allow people to create their own private branches out of trunk, where they can freely check-in and merge later (hopefully often). However, creating a branch, the special permissions are copied along with the folders, meaning that people can't freely check-in into their branch. Is there a way

Git: Commit to multiple branches at the same time

爱⌒轻易说出口 提交于 2020-01-09 04:17:07
问题 I want to make a single commit on different branches at the same time, since, in my project, I have different branches for different clients. Say, I have made a new feature commit on Branch A. Can I also make this commit on Branch B, Branch C and D at the same time as well? Is there any short cut command for this? This is very troublesome to checkout one branch, and cherrypick the commit everytime, sometime, if the commit is necessary on many branches, it would be a nightmare for me. Any