branch

How to create a new remote branch with EGit?

牧云@^-^@ 提交于 2019-12-03 06:04:37
Let's say I have an Eclipse Project which uses versioning control with EGit and is connected with a remote repository git@myrepo.com:git2013 . In my project, under the local branch newstuff , I create and change some files. Now, I want to push this to a remote branch named newstuff in my remote repository. But my remote repository only holds a branch master . How do I create a new remote branch called newstuff ? PS: Please do not answer with command-line git commands; describe how to do it in EGit. VonC You can follow the section " Configuring upstream push " in order to push a given branch:

Git branch has diverged after rebase, so why rebase?

心已入冬 提交于 2019-12-03 05:54:49
问题 Recently I came across the notification that my branch has diverged. That was when I made a feature branch, pushed it to remote, and did a rebase with master a few days later when I started working on it again. git checkout -b feature-branch git push origin feature-branch:feature-branch ...and when in master... git pull origin master git checkout feature-branch git rebase master But when I want to push my branch again, it says: On branch feature-branch Your branch and 'origin/feature-branch'

Git rebase branch with merged children

不羁岁月 提交于 2019-12-03 05:51:06
Today I faced with one problem. My teammate created branch from master. He developed one feature in this branch and after that developed two subfeatures in subfeature's branches. At last he did two refactoring commit of the entire thing. So... C--D E--F | subfeatures / \ / \ B------M1------M2--G--H | feature / A-------------------K | master Usually we rebase feature branches before no-fast-forward merge it into master. But of course this rebase fails. Rebased feature branch became looking like: B'--C'--D'--E'--F'--G'--H' / A--K Of course pointers of C & D became wrong so I also get two

Are there different meanings to the concept of 'tracking' in git?

一世执手 提交于 2019-12-03 05:44:50
I run 'git branch -r' and get origin/branch1 origin/branch2 From the man page, the -r option will "list or delete (if used with -d) the remote-tracking branches". So origin/branch1 and origin/branch2 are known as remote-tracking branches. However, you can't commit directly onto a remote-tracking branch (an anonymous branch will be created instead). A remote-tracking branch simply tracks a remote branch when running 'git fetch'. Here's where the semantics get a little blurry for me. If I then git checkout -b branch1 origin/branch1 I get the following output: "Branch branch1 set up to track

How to move commits to another branch?

浪子不回头ぞ 提交于 2019-12-03 05:42:36
I'd like to move my last few commits from master into a branch of their own. The tree on my PC looks like that: W (some branch) / X1--X2--X3--X4--Y--Z1--Z2 (master) I'd like it to look like: W (some branch) / X1--X2--X3--X4 (master) \ Y--Z1--Z2 (my new branch) However, the tree at GitHub looks like: W (some branch) / X1--X2--X3--X4--Y (master) That's what I saw as a solution for moving the last commits to another branch: git checkout master git branch my_new_branch git reset <commit_id> My question is: would I be able to successfully push to GitHub after moving the commits into a new branch

Why can't I push this change to my 'main' mercurial repository?

孤人 提交于 2019-12-03 05:28:30
问题 I am trying to grok Mercurial and hope I am just getting confused here! I have a repository ('main') that I have cloned ('clone'), , both on my own machine. Both were completely in sync with each other. I decided to play with named branches so the next time I committed on my 'clone' I did it under a branch name of 'case1212' and while it seems to have dealt with the commit properly on my clone, I cannot push these changes back to 'main'. The error given is: abort: push creates new remote

Do git tags apply to all branches?

笑着哭i 提交于 2019-12-03 05:26:44
I'm getting my feet wet with git tagging, but my previous background is in Subversion, where "tags" were really just copies, not "real" tags... If I add a tag to a git repo, is it applied to all branches or only the current one? For example, if I currently have these branches ( git branch -v ): * master deadbeef My master head comment dev baddfeed My def head comment And the currently checked out branch is master, as you can see. Now suppose I git tag -a TAGNAME , does TAGNAME apply only to deadbeef (master branch) or to baddfeed (dev branch) as well? e.g., Say I subsequently switch to the dev

git - update fork's master & rebase my branch onto it?

强颜欢笑 提交于 2019-12-03 05:15:50
问题 I have forked a github project, then cloned it locally. I then made some changes in a new branch on my_github/the_project repo. I then added and committed the changes and pushed to my github repo and submitted a pull request. The owner has received my request and would like me to "rebase onto master" to get the latest changes. How do I do this? Initially I thought I could just git fetch and rebase master from within my current branch (as most posts I found advise...), but git fetch didn't do

Git Workflow Best practices

纵饮孤独 提交于 2019-12-03 05:11:19
问题 Stupid question and treat me as completely a newbie to version control. I'm new to Git (I've used subversion before, but just the basics) I understand the basics of Git and its branching commands, I have an imaginary situation that need your advice. Suppose my software currently is at v1.2, stable and released. My Software v1.0 v1.1 v1.1.1 v1.2 <- Current, Compilable and Released Scenario: I have two developers, John and Eric. John is responsible for bug fixes reported by clients. Eric is

Git: How to rebase and squash commits from branch to master?

我只是一个虾纸丫 提交于 2019-12-03 05:08:42
问题 I'm trying to rebase and squash all my commits from current branch to master. Here is what I'm trying to do: git checkout -b new-feature make a couple of commits, after it I was trying: git rebase -i master in this case commits will remain in new-feature branch git checkout master git rebase -i new-feature It gives me and edit window with noop message. I know about command: git merge --squash new-feature But I'm currently working on learning of rebase command. 回答1: When rebasing, Git will not