3 回答
TA贡献1853条经验 获得超18个赞
integer =
<<<<<<< HEAD <-+ remove the bits here
digits:[0-9]+ |
{ return digits.join(""); } |
======= <-+
sign:"-"* digits:[0-9]+
{ return sign + digits.join(""); }
>>>>>>> gh-pages <-- and thisinteger =
sign:"-"* digits:[0-9]+
{ return sign + digits.join(""); }TA贡献1853条经验 获得超9个赞
git mergetool
git checkout --ours -- /path/to/conflicted-file # this is probably the one you want git checkout --theirs -- /path/to/conflicted-file
git reset --hard # sounds like --hard is what you need but check other options
TA贡献1839条经验 获得超15个赞
示例脚本:
# vim /usr/sbin/solve.git
#!/bin/bash for f in $(grep -Rl '^>>>>>>> ' --include="*.php" --include="*.css" --include="*.js" --include="*.html" --include="*.svg" --include="*.txt" .) do sed -i -e '/^=======/,/^>>>>>>> /d' -e '/^<<<<<<< /d' $f sed -i -e '/^>>>>>>> /d' $f echo "$f Fixed" done git add . ; git commit -am "[+] Resolved on `date` from `hostname` by `whoami`" --no-verify
# chmod 755 /usr/sbin/solve.git
$ cd <path_to_repo>$ solve.git
- 3 回答
- 0 关注
- 713 浏览
添加回答
举报
