You are not logged in.
master branch
stable 0.1 branch
I made some changes in master that I now want to backport to the stable stree.
When trying git rebase master from the 0.1 branch I get this :
$ git rebase master
warning: skipped previously applied commit eba3ad9
hint: use --reapply-cherry-picks to include skipped commits
hint: Disable this message with "git config set advice.skippedCherryPicks false"
Auto-merging VERSION
CONFLICT (content): Merge conflict in VERSION
error: could not apply 3afa26e... bump version to 0.1.0
hint: Resolve all conflicts manually, mark them as resolved with
hint: "git add/rm <conflicted_files>", then run "git rebase --continue".
hint: You can instead skip this commit: run "git rebase --skip".
hint: To abort and get back to the state before "git rebase", run "git rebase --abort".
hint: Disable this message with "git config set advice.mergeConflict false"
Could not apply 3afa26e... # bump version to 0.1.0
$ The VERSION file does exist in both branches but is intended to be maintained separately and commits changing it should have no effect on other branches .
One way might be to skip commits that change VERSION but I'm not sure if that commit will then still be present in the 0.1 branch .
How to backport the changes to master except the one in VERSION ?
Last edited by Lone_Wolf (Yesterday 12:12:28)
Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.
clean chroot building not flexible enough ?
Try clean chroot manager by graysky
Offline
Do you have a feature branch that just contains the feature you merged into master that you now want in stable 0.1? If not do you want every commit from master apart from those touching VERSION?
Offline
Problem is gonna be if a commit touches multiple files and *also* VERSION
You'll have to resolve the conflict, see https://stackoverflow.com/questions/578 … s-or-files
But idk whether you can implant --theirs/--ours <file> as specific partial --strategy to automate that (partially subscribing in case somebody knows
)
Offline
No feature branch, just master and one stable branch for now .
I test the code changes outside of git and frequently update master locally then push it to upstream origin .
I looked at the recent commits for master and realised there is one that changes VERSION and one other file.
The VERSION file was added to have a simple way to distinguish between branches/versions but it seems things have gotten more complex instead of simpler .
I can workaround the conflict by applying the changes manually. Problem with that is it won't work for complex changes.
Maybe developing in separate branches and not in master is the best option even for a simple small one-man repo ?
Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.
clean chroot building not flexible enough ?
Try clean chroot manager by graysky
Offline
The VERSION file was added to have a simple way to distinguish between branches/versions
git branch --show-current?
I have that in my $RPS1 (right aligned prompt, zsh)
Offline
this is in mine
parse_git_branch() {
local branch=""
branch=$(git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/\1/')
local git_status=$(git status --porcelain 2>/dev/null)
local color=green
if echo "$git_status" | grep -q "^ M"; then
color=#DA70D6
branch="${branch}*"
fi
if echo "$git_status" | grep -qE "^ A|^\?\?"; then
color=cyan
branch="${branch}+"
fi
if echo "$git_status" | grep -q "^ D"; then
color=red
branch="${branch}-"
fi
if [[ -n "$branch" ]]; then
branch=[%F{${color}}${branch}%F{reset}]
fi
echo "$branch"
}
update_prompt() {
PS1="%F{cyan}%~
%F{green}%1~ %F{magenta}❯%{$reset_color%}$(parse_git_branch) "
}
precmd_functions+=(update_prompt)
update_promptI Have Linux Perl Can i Download Gnome???
Offline
I use bash, no idea if that's possible with a bash prompt. It does appear to be limited to cli and won't help in a gui filemanager .
The simplest solution appears to remove the VERSION file and instead add 1 file called <name-of-branch>.branch to each branch.
Adding *.branch to .gitignore should prevent merge conflicts and ensure only manually created .branch files exist.
Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.
clean chroot building not flexible enough ?
Try clean chroot manager by graysky
Offline
it can be done in your bash prompt https://web.archive.org/web/20160704140 … rompt.html
I Have Linux Perl Can i Download Gnome???
Offline
Interesting and the script they mention is present in /usr/share/git .
Looks like I'll be using prompt for cli as well as an untracked file for gui .
Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.
clean chroot building not flexible enough ?
Try clean chroot manager by graysky
Offline
I've changed my bash prompt and now my ~/.bashrc has
source /usr/share/git/git-prompt.sh
PS1='[\u@\h \W]$(__git_ps1 " (%s)")\$ 'Works fine and helps a lot with keeping track of the branch i'm working on.
Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.
clean chroot building not flexible enough ?
Try clean chroot manager by graysky
Offline
The question I asked in the opening post hasn't been answered, but atleast there's a usable workaround.
Maybe what I wanted is impossible with git but it's still unclear.
Marking as workaround.
Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.
clean chroot building not flexible enough ?
Try clean chroot manager by graysky
Offline