rebase

Git: Show list of commits during interactive rebase

。_饼干妹妹 提交于 2019-12-07 14:32:19
问题 I'm in the middle of an interactive rebase. Is there a command that shows the list of commits that were initially selected when I started the rebase? 回答1: During the interactive rebase, git updates files in your .git directory under the sub-directory rebase-merge (the exact path has changed in various versions of git, as I recall; I'm looking at git 2.0.x behavior right now). In that directory are the files done and git-rebase-todo . These are not quite what you asked for: they're the

Git new file appears in all branches

自闭症网瘾萝莉.ら 提交于 2019-12-07 09:21:27
问题 I thought a file created on one branch will not appear in any other branches until I merge or rebase the branch? Example: I have two branches: master new_contact_page I checkout the new_contact_page branch. $ git checkout new_contact_page Then I create a new file. $ vi contact_page.html Without doing any Git commands, I switch back to my Master branch. $ git checkout master Then I see that this contact_page.html file is also in my Master branch. $ ls (contact_page.html shows up in the list!)

git rebase --committer-date-is-author-date --root does not work

空扰寡人 提交于 2019-12-07 07:55:05
问题 I try to set the committer date of the latest commit to its author date. Usually this works with git rebase --committer-date-is-author-date HEAD~1 . Unfortunately there is only one commit which means that I have to use --root instead of HEAD~1 but git rebase --committer-date-is-author-date --root does not set the committer date to the author date for some reason. What can I do? 回答1: The bad news Unfortunately git rebase --root uses the interactive rebase code (because the non-interactive code

git rebase stopped working in git for windows

試著忘記壹切 提交于 2019-12-07 05:36:13
问题 I'm observing very strange crashes in git rebase. Operations that I'm performing haven't change, but their result has changed since some time ago. Instead of rebased branch I get help message from git rebase, describing command line options, and file bash.exe.stackdump with some hex numbers. The same behavior is observed during execution of git pull --rebase . Rebasing pulled commits is my default setting therefore this misbehavior is very annoying. Example: $ git rebase master feature/tune

Failed to push some refs when pushing feature branch

僤鯓⒐⒋嵵緔 提交于 2019-12-07 02:10:38
问题 What can I do to avoid getting the following message when I push a feature branch a second time: To https://github.com/xxx/git_test.git ! [rejected] feature_branch -> feature_branch (non-fast-forward) error: failed to push some refs to 'https://github.com/xxx/git_test.git' hint: Updates were rejected because the tip of your current branch is behind hint: its remote counterpart. Merge the remote changes (e.g. 'git pull') hint: before pushing again. hint: See the 'Note about fast-forwards' in

Does git's -X “theirs” not handle new/deleted file conflicts?

安稳与你 提交于 2019-12-06 19:33:25
问题 Following on the scenario from this question, I'm performing a git rebase -s recursive -X theirs etc... and am surprised to be stopped with the following types of conflicts: added by them deleted by them deleted by us Is there some reason the strategy doesn't cope with these? (I don't know if this is significant, but git doesn't report conflicts in the output, it just says When you have resolved this problem run "git rebase --continue" ) UPDATE Here's a script that doesn't quite reproduce,

Git: Why does rebase result in conflicts while merge does not?

 ̄綄美尐妖づ 提交于 2019-12-06 19:03:04
问题 I'm probably not getting something right, but could anyone explain to me why git rebase results in conflicts, while git merge (same branch) does not? For as far as I know git rebase puts the commits from the other branch before the commits I made on my current branch, while git merge takes those same commits and applies them to my branch as patch, right? Is the diff then not the same, although maybe reversed? Not sure why patching my branch with the other commits is not a problem, while

Git flow - managing differences between master and develop

故事扮演 提交于 2019-12-06 17:56:26
I've been using Git Flow for a little while now, however in the initial week or so I was creating release branches manually from master and cherry picking the required commits into the release branch rather than creating them from master. For example, if I have commit abcd123 My commit message in the develop branch, I had also cherry picked it into the release branch manually, and at this point I had probably amended or edited the commit message, so the release branch (and now master branch) contain this commit but with a different hash, e.g. dbca321 My adjusted commit message . The problem

Git: How do I rebase Branch Feature back onto Branch Develop minus Branch MyLocalChanges

女生的网名这么多〃 提交于 2019-12-06 15:59:32
We have a develop branch and many feature branches that are created from develop as needed and will eventually be merged back into develop . When I work, I have a set of local changes I like to make, these are changes to settings, changes to scripts, changes to modules, etc. that change various flags, or change log messages, or do this or that differently from how much of the team works. I'd like to keep those changes in a branch based on develop called MyLocalChanges which would be developed and merged (?) into what feature branch I am working on, but which never be merged back into develop

Least number of commands to rebase private branch

随声附和 提交于 2019-12-06 14:28:29
I'm still in the process of getting confident with Git so am still treading carefully with some elements of it. The list of commands I have for rebasing my private branch as I work (so it does not become out of date by the time I'm finished) is: # Prepare the new private branch git checkout develop git pull origin develop git checkout -b new-feature # work, commit, work commit, time to rebase... git checkout develop git pull develop origin git checkout new-feature git rebase develop # continue working... What I'm wondering is if I can save a few steps and do the following when I want to rebase