branch

Can't see remote branch, problems with .git/config?

落花浮王杯 提交于 2019-12-01 09:19:54
For some reason I can't see new branches that one my team has entered, I am 99% sure the branch exists as I can see it in Bitbucket's UI. I have a feeling it may be because my .git/config file is not correct. At the moment I have this... [remote "origin"] url = git@bitbucket.org:user/project.git fetch = +refs/heads/master:refs/remotes/origin/master fetch = +refs/heads/testing:refs/remotes/origin/testing fetch = +refs/heads/uat:refs/remotes/origin/uat fetch = +refs/heads/release-1.9:refs/remotes/origin/release-1.9 I have tried "git remote update" & "git fetch origin" but both fail to get the

Why do I need the “master” in git merge origin/master?

谁都会走 提交于 2019-12-01 08:50:10
The convention when using git and you want to get changes from the server is: git fetch git merge origin/master I know there is also git pull , but my specific question is about the syntax origin/master . What does the master part do? If I just do git merge origin (without the master ) it seems to work. I know master is a branch, but if I'm tracking more than one branch of a remote, would the normal use case be to merge all of them? The argument(s) to merge are resolved to commit-IDs. This means that the rules in gitrevisions are applied. In general, origin/ name resolves to one of the "remote

How to perform merge?

北慕城南 提交于 2019-12-01 08:48:43
问题 I have a master branch and a feature branch. The feature branch has several changes but the master branch has many changes like removing 10 projects from the repository. The question is how to merge the feature branch back to master branch? 1) merge feature with master and then master with feature OR 2) merge master with feature directly 回答1: checkout master checkout -b develop (assuming you don't already have a develop branch) merge --no-ff your-feature-branch Resolve any conflicts in code.

Why does a pipe remove the branch names from git log?

删除回忆录丶 提交于 2019-12-01 08:45:17
when I run > git log --oneline I get output that looks like this abcdef0 (head, branch, origin/branch) comment 0987654 different comment 1234567 (different-branch, origin/branch) third comment But as soon as I pipe the output to anything (e.g. > git log --oneline | cat ), the branch names are gone abcdef0 comment 0987654 different comment 1234567 third comment This means I can't grep, or add line numbers, or anything like that. (It's also missing the colors and less style behavior, but I don't care about that either way today) Is this something I can re-enable via a command-line parameter? For

Keep settings in branch

这一生的挚爱 提交于 2019-12-01 08:42:40
I begin to use git for software development. I have a project on github. This project also involves some user-settings stored in dedicated settings-files. On github the settings should be empty (like this) ### Settings: ## Your name $name = ""; ## Your email adress $email = ""; ## and so on However, I also have the project running on my computer (or server). My personal version of the project should have all settings filled out. I would like to have two branches for that. The personal branch should contain all my settings. The master branch should be the one where I develop the software and

Github最新客户端的简单使用教程

风格不统一 提交于 2019-12-01 08:30:00
1. 下载安装客户端 在官网 https://github-for-windows.en.softonic.com/?ex=BB-527.0 下载 github最新客户端 2.下载之后安装,在桌面生成以下快捷方式 注册登录 如果没有 github 账号需注册一个,有的话直接登陆即可 3. 在本地建仓库并上传到远程仓库 点击 Create new repository 创建一个新的仓库 Name :仓库名 Description :对仓库的描述 Local Path :本地仓库路径 建好之后如下所示,里面有一个文件 . gitattributes ,右边是文件内容 点击右上角的 Publish repository ,将仓库上传 Name :仓库的名字 Description :对此次上传仓库的描述 在远程查看仓库是否已添加 点击菜单栏的 Repository, 在点击 View on Github ( Ctrl+Shift+G ) 在本地查看刚刚建立的仓库 点击菜单栏的 Repository, 在 点击 Show in Explorer( Ctrl+Shift+F ) 打开本地路径之后,在里面新建一个 text.txt 文件 打开客户端 ,可以看到 Changes 有一个新消息 在这里可以看到我们刚刚新建的 text 文件 Summary :概要解释,显示在网页上

How do I determine what branch/tag I have checked out in git?

倖福魔咒の 提交于 2019-12-01 08:12:42
I clone my source using git clone https://gerrit.wikimedia.org/r/p/mediawiki/core.git w/ . Then I specify a specific branch/tag by doing git checkout <tag name> or git checkout origin/REL<release number> . Sometimes I forget what branch or tag I'm on. In SVN I would do a svn info to figure out what branch/tag I'm using (I realize that git has distinct definitions for branch and tag but for my purposes they are the same). How do I determine what branch/tag I am on? git branch tells you what branch you're on (with a * marker). Tags are just names for revisions, so Git won't tell you that you're

git 常用命令记录 -- 快捷&备忘

喜欢而已 提交于 2019-12-01 07:54:54
1.安装 略 2.git拉取远程分支 git config user.name git config user.email git config --global user.name xxxx git config --global user.email xxxx.com git config -l 配置多个key ssh-keygen -t rsa -C "xxxx.com" xxxx.com ssh-keygen -t rsa -C "xxxx.com" -f C:/Users/xxxxxxxx/.ssh/github_rsa 配置config 多个账号配置 # 配置github.com Host github.com HostName github.com IdentityFile C:\\Users\\xxxxxxxx\\.ssh\\github_rsa PreferredAuthentications publickey # 配置gitlab.com Host gitlab.com HostName gitlab.com IdentityFile C:\\Users\\xxxxxxxx\\.ssh\\id_rsa.pub PreferredAuthentications publickey 0.1 git init 0.2 git remote add origin

egit: changes made in one branch are visible on another branch without any commit

╄→гoц情女王★ 提交于 2019-12-01 07:52:00
问题 I am using egit and this is what I see. Don't really understand how this works From master, switch to a new branch. Make changes to existing files, modify files. Switch to master, all changes are seen on master. (No prompt, that need to commit changes before switching) 回答1: This is not a problem with egit, but the default behavior for how git works in general. If you make some changes, and do not add/commit them into git, then they are applied to any branch you checkout next. Only when the

git清除所有commit

帅比萌擦擦* 提交于 2019-12-01 07:51:38
原理:新切一个分支并切换到这个分支,删除原来的master分支,再将新分支变成master 1. checkout,创建并切换到新分支 git checkout --orphan latest_branch 2. add all files, 添加所有的文件到新分支 git add -A 3. commit changes,提交所有的改变 git commit -am "commit message" 4. delete origin master,删除原来的master分支 git branch -D master 5. rename the current branch to master, 重命名这个新分支为master git branch -m master 6. force update your repository,强推这个仓库 git push -f origin master 来源: https://www.cnblogs.com/UniqueColor/p/11670651.html