git pull --rebase not yeilding deseired outcome -
i lost changes did files after doing git pull --rebase. have absolutely no clue happened here , in end , ended checking out changes ( backing them in seperate folder ) pasting before commiting. here entire terminal showdown.
thisuser@desktop-ens2652:/mnt/c/sites/application$ git status changes not staged commit: (use "git add <file>..." update committed) (use "git checkout -- <file>..." discard changes in working directory) modified: gemfile.lock modified: app/controllers/application_controller.rb modified: app/uploaders/pdf_uploader.rb modified: lib/card/print_manager.rb no changes added commit (use "git add" and/or "git commit -a") thisuser@desktop-ens2652:/mnt/c/sites/application$ git add -u thisuser@desktop-ens2652:/mnt/c/sites/application$ git status on branch card_application branch up-to-date 'origin/card_application'. changes committed: (use "git reset head <file>..." unstage) modified: gemfile.lock modified: app/controllers/application_controller.rb modified: app/uploaders/pdf_uploader.rb modified: lib/card/print_manager.rb thisuser@desktop-ens2652:/mnt/c/sites/application$ git commit -m "cleaning temp pdf folder, reading directly s3" [card_application 04e9712] cleaning temp pdf folder, reading directly s3 4 files changed, 53 insertions(+), 57 deletions(-) thisuser@desktop-ens2652:/mnt/c/sites/application$ git push warning: push.default unset; implicit value changing in git 2.0 'matching' 'simple'. squelch message , maintain current behavior after default changes, use: git config --global push.default matching squelch message , adopt new behavior now, use: git config --global push.default simple when push.default set 'matching', git push local branches remote branches exist same name. in git 2.0, git default more conservative 'simple' behavior, pushes current branch corresponding remote branch 'git pull' uses update current branch. see 'git config' , search 'push.default' further information. (the 'simple' mode introduced in git 1.7.11. use similar mode 'current' instead of 'simple' if use older versions of git) username 'https://github.com': userid@gmail.com password 'https://**********: https://github.com/gitrepo/application.git ! [rejected] card_application -> card_application (fetch first) error: failed push refs 'https://github.com/gitrepo/application.git' hint: updates rejected because remote contains work hint: not have locally. caused repository pushing hint: same ref. may want first integrate remote changes hint: (e.g., 'git pull ...') before pushing again. hint: see 'note fast-forwards' in 'git push --help' details. thisuser@desktop-ens2652:/mnt/c/sites/application$ git pull --rebase remote: counting objects: 11, done. remote: compressing objects: 100% (11/11), done. remote: total 11 (delta 0), reused 0 (delta 0), pack-reused 0 unpacking objects: 100% (11/11), done. https://github.com/user2/application 458a7f6..c1021f4 card_application -> origin/card_application first, rewinding head replay work on top of it... applying: cleaning temp pdf folder, reading directly s3 using index info reconstruct base tree... m app/controllers/application_controller.rb <stdin>:227: trailing whitespace. #file = <stdin>:246: trailing whitespace. <stdin>:303: trailing whitespace. warning: 3 lines add whitespace errors. falling patching base , 3-way merge... error: local changes following files overwritten merge: gemfile.lock please, commit changes or stash them before can merge. aborting failed merge in changes. patch failed @ 0001 cleaning temp pdf folder, reading directly s3 copy of patch failed found in: /mnt/c/sites/application/.git/rebase-apply/patch when have resolved problem, run "git rebase --continue". if prefer skip patch, run "git rebase --skip" instead. check out original branch , stop rebasing, run "git rebase --abort". thisuser@desktop-ens2652:/mnt/c/sites/application$ git checkout gemfile.lock thisuser@desktop-ens2652:/mnt/c/sites/application$ git rebase --continue app/controllers/application_controller.rb: needs update app/uploaders/pdf_uploader.rb: needs update lib/card/print_manager.rb: needs update must edit merge conflicts , mark them resolved using git add thisuser@desktop-ens2652:/mnt/c/sites/application$ git diff app/uploaders/pdf_uploader.rb fatal: ambiguous argument 'app/uploaders/pdf_uploader.rb': unknown revision or path not in working tree. use '--' separate paths revisions, this: 'git <command> [<revision>...] -- [<file>...]' thisuser@desktop-ens2652:/mnt/c/sites/application$ git status rebase in progress; onto c1021f4 rebasing branch 'card_application' on 'c1021f4'. (all conflicts fixed: run "git rebase --continue") changes not staged commit: (use "git add/rm <file>..." update committed) (use "git checkout -- <file>..." discard changes in working directory) modified: app/controllers/application_controller.rb deleted: app/uploaders/pdf_uploader.rb deleted: lib/card/print_manager.rb no changes added commit (use "git add" and/or "git commit -a") thisuser@desktop-ens2652:/mnt/c/sites/application$ git rebase --continue app/controllers/application_controller.rb: needs update app/uploaders/pdf_uploader.rb: needs update lib/card/print_manager.rb: needs update must edit merge conflicts , mark them resolved using git add thisuser@desktop-ens2652:/mnt/c/sites/application$ git add app/uploaders/pdf_uploader.rb warning: ran 'git add' neither '-a (--all)' or '--ignore-removal', behaviour change in git 2.0 respect paths removed. paths 'app/uploaders/pdf_uploader.rb' removed working tree ignored version of git. * 'git add --ignore-removal <pathspec>', current default, ignores paths removed working tree. * 'git add --all <pathspec>' let record removals. run 'git status' check paths removed working tree. thisuser@desktop-ens2652:/mnt/c/sites/application$ git log commit c1021f41cc7e01b3ee3c766698a3acbbd05824b3 author: user1 <user1@gmail.com> date: wed aug 17 00:40:00 2016 -0400 pre-filling instruction started commit 458a7f6b353803453208da89c98e8f0e5f4dcf6e author: user2 <user2t@gmail.com> date: tue aug 16 22:48:55 2016 -0400 fixes continued commit e92138bef7b6ad575cff7690621ab017cca4183f author: user3 <user3@gmail.com> date: tue aug 16 17:59:42 2016 -0400 added tooltips eligibility modal , attorney signup page. added attorney landing page commit 8d20bd7d29cdd42814e1872c4a70d453b14f8134 author: user5 <user5@somedomain.com> date: tue aug 16 22:27:52 2016 +0530 checked nil before destroying record in card application commit 688dd02069c9c7e35ea5bbc4f80f7860e95e9987 author: user5 <user5@somedomain.com> date: tue aug 16 22:05:03 2016 +0530 removed required validation other names in applicant general tab. fixed issue applicant intending thisuser@desktop-ens2652:/mnt/c/sites/application$ git cherry -v not find tracked remote branch, please specify <upstream> manually. usage: git cherry [-v] [<upstream> [<head> [<limit>]]] --abbrev[=<n>] use <n> digits display sha-1s -v, --verbose verbose thisuser@desktop-ens2652:/mnt/c/sites/application$ git cherry -v origin/card_application thisuser@desktop-ens2652:/mnt/c/sites/application$ git rebase --abort thisuser@desktop-ens2652:/mnt/c/sites/application$ git cherry -v origin/card_application + 04e971223b5907305fbe95867a8db58e0de0ea4a cleaning temp pdf folder, reading directly s3 thisuser@desktop-ens2652:/mnt/c/sites/application$ git diff-tree --no-commit-id --name-only -r 04e971223b5907305fbe95867a8db58e0de0ea4a gemfile.lock app/controllers/application_controller.rb app/uploaders/pdf_uploader.rb lib/card/print_manager.rb thisuser@desktop-ens2652:/mnt/c/sites/application$ git checkout 04e971223b5907305fbe95867a8db58e0de0ea4a gemfile.lock thisuser@desktop-ens2652:/mnt/c/sites/application$ git checkout 04e971223b5907305fbe95867a8db58e0de0ea4a app/controllers/application_controller.rb thisuser@desktop-ens2652:/mnt/c/sites/application$ git checkout 04e971223b5907305fbe95867a8db58e0de0ea4a app/uploaders/pdf_uploader.rb thisuser@desktop-ens2652:/mnt/c/sites/application$ git checkout 04e971223b5907305fbe95867a8db58e0de0ea4a lib/card/print_manager.rb thisuser@desktop-ens2652:/mnt/c/sites/application$ git reset head~ unstaged changes after reset: m gemfile.lock m app/controllers/application_controller.rb m app/uploaders/pdf_uploader.rb m lib/card/print_manager.rb thisuser@desktop-ens2652:/mnt/c/sites/application$ git pull updating 458a7f6..c1021f4 error: local changes following files overwritten merge: app/controllers/application_controller.rb please, commit changes or stash them before can merge. aborting thisuser@desktop-ens2652:/mnt/c/sites/application$ git stash "mychanges" usage: git stash list [<options>] or: git stash show [<stash>] or: git stash drop [-q|--quiet] [<stash>] or: git stash ( pop | apply ) [--index] [-q|--quiet] [<stash>] or: git stash branch <branchname> [<stash>] or: git stash [save [--patch] [-k|--[no-]keep-index] [-q|--quiet] [-u|--include-untracked] [-a|--all] [<message>]] or: git stash clear thisuser@desktop-ens2652:/mnt/c/sites/application$ git stash saved working directory , index state wip on card_application: 458a7f6 fixes continued head @ 458a7f6 fixes continued thisuser@desktop-ens2652:/mnt/c/sites/application$ git pull updating 458a7f6..c1021f4 fast-forward app/controllers/application_controller.rb | 5 +++-- app/views/card_application/completion.en.html.haml | 21 ++++++++++++++------- .../card_application/prefiling_instructions_concurrent/_passport_photos.en.html.haml | 8 +++++--- app/views/card_application/prefiling_instructions_concurrent/_us_status.en.haml | 6 ++++-- 4 files changed, 26 insertions(+), 14 deletions(-) thisuser@desktop-ens2652:/mnt/c/sites/application$ git unstash.pop git: 'unstash.pop' not git command. see 'git --help'. thisuser@desktop-ens2652:/mnt/c/sites/application$ git unstash git: 'unstash' not git command. see 'git --help'. thisuser@desktop-ens2652:/mnt/c/sites/application$ git stash apply auto-merging app/controllers/application_controller.rb on branch card_application branch up-to-date 'origin/card_application'. changes not staged commit: (use "git add <file>..." update committed) (use "git checkout -- <file>..." discard changes in working directory) modified: gemfile.lock modified: app/controllers/application_controller.rb modified: app/uploaders/pdf_uploader.rb modified: lib/card/print_manager.rb no changes added commit (use "git add" and/or "git commit -a") thisuser@desktop-ens2652:/mnt/c/sites/application$ git add -u thisuser@desktop-ens2652:/mnt/c/sites/application$ git status on branch card_application branch up-to-date 'origin/card_application'. changes committed: (use "git reset head <file>..." unstage) modified: gemfile.lock modified: app/controllers/application_controller.rb modified: app/uploaders/pdf_uploader.rb modified: lib/card/print_manager.rb thisuser@desktop-ens2652:/mnt/c/sites/application$ git commit -m "cleaning temp pdf folder , reading directly s3" [card_application 0379504] cleaning temp pdf folder , reading directly s3 4 files changed, 53 insertions(+), 57 deletions(-) thisuser@desktop-ens2652:/mnt/c/sites/application$ git push warning: push.default unset; implicit value changing in git 2.0 'matching' 'simple'. squelch message , maintain current behavior after default changes, use: git config --global push.default matching squelch message , adopt new behavior now, use: git config --global push.default simple when push.default set 'matching', git push local branches remote branches exist same name. in git 2.0, git default more conservative 'simple' behavior, pushes current branch corresponding remote branch 'git pull' uses update current branch. see 'git config' , search 'push.default' further information. (the 'simple' mode introduced in git 1.7.11. use similar mode 'current' instead of 'simple' if use older versions of git) username 'https://github.com': rachit.pant@gmail.com password 'https://afasdfasdf': remote: invalid username or password. fatal: authentication failed 'https://github.com/gitrepo/application.git/' thisuser@desktop-ens2652:/mnt/c/sites/application$ git push warning: push.default unset; implicit value changing in git 2.0 'matching' 'simple'. squelch message , maintain current behavior after default changes, use: git config --global push.default matching squelch message , adopt new behavior now, use: git config --global push.default simple when push.default set 'matching', git push local branches remote branches exist same name. in git 2.0, git default more conservative 'simple' behavior, pushes current branch corresponding remote branch 'git pull' uses update current branch. see 'git config' , search 'push.default' further information. (the 'simple' mode introduced in git 1.7.11. use similar mode 'current' instead of 'simple' if use older versions of git) username 'https://github.com': userid@gmail.com password 'https://userid@gmail.com@github.com': counting objects: 51, done. delta compression using 4 threads. compressing objects: 100% (11/11), done. writing objects: 100% (11/11), 1.53 kib | 0 bytes/s, done. total 11 (delta 9), reused 0 (delta 0) remote: resolving deltas: 100% (9/9), completed 9 local objects. https://github.com/gitrepo/application.git c1021f4..0379504 card_application -> card_application
it's quite difficult what's wrong 300 or lines of bash (from 90% useless). guess you're doing wrong during rebase.
for each step (each commit rebasing), if there conflict (and seems have), need edit conflicted file(s) editor or mergetool (kdiff, meld, winmerge, ...). once conflict resolved (no more <<<...
, ===...
or >>>...
in files), add files (git add ...
) , continue rebase (git rebase --continue
) withtou commiting.
before start rebase, make sure working directory clean (by stashing, commiting or canceling local changes).
it doesn't hurt to have @ doc if you're not sure how rebase work cause it's not trivial if you're new git.
Comments
Post a Comment