如何获得提交

时间:2017-05-29 08:31:19

标签: git

我失去了这些变化。我怎样才能结账并让自己回到这个状态:

分支机构/主页登录✗10h39m✖▴✚。 ▶gcmsg"将用户全部重命名为auth"

[log-in 17b0a0f] renamed user to auth across the board
 22 files changed, 236 insertions(+), 201 deletions(-)
 rename src/client/Api/{UserApi.js => AuthApi.js} (77%)
 create mode 100644 src/client/actions/Auth/AuthActions.js
 create mode 100644 src/client/actions/Auth/AuthAsyncActions.js
 delete mode 100644 src/client/actions/User/UserActions.js
 delete mode 100644 src/client/actions/User/UserAsyncActions.js
 create mode 100644 src/client/reducers/AuthReducer.js
 delete mode 100644 src/client/reducers/UserReducer.js
 create mode 100644 src/test/unit/actions/auth.action.spec.js
 create mode 100644 src/test/unit/actions/auth.async.action.spec.js
 delete mode 100644 src/test/unit/actions/user.action.spec.js
 delete mode 100644 src/test/unit/actions/user.async.action.spec.js
 rewrite src/test/unit/reducers/user.reducers.spec.js (71%)

▶git rebase -i develop

It seems that there is already a rebase-merge directory, and
I wonder if you are in the middle of another rebase.  If that is the
case, please try
        git rebase (--continue | --abort | --skip)
If that is not the case, please
        rm -fr "homepage/.git/rebase-merge"
and run me again.  I am stopping in case you still have something
valuable there.

▶git rebase - 继续

error: could not apply d809245... fixed login test

When you have resolved this problem, run "git rebase --continue".
If you prefer to skip this patch, run "git rebase --skip" instead.
To check out the original branch and stop rebasing, run "git rebase --abort".
Could not apply d809245bc75391e1afc18ca0438ba612bfe7ed98... fixed login test

▶git rebase --skip

error: could not apply 1edb9a9... cleanup

When you have resolved this problem, run "git rebase --continue".
If you prefer to skip this patch, run "git rebase --skip" instead.
To check out the original branch and stop rebasing, run "git rebase --abort".
Could not apply 1edb9a9c208578bb179712575e0277dca509979a... cleanup

▶git rebase --abort

▶git status

On branch log-in
Your branch is up-to-date with 'origin/log-in'.
nothing to commit, working tree clean

▶git rebase -i develop

error: could not apply 51fcda4... problem with call to API - getting 403

When you have resolved this problem, run "git rebase --continue".
If you prefer to skip this patch, run "git rebase --skip" instead.
To check out the original branch and stop rebasing, run "git rebase --abort".
Could not apply 51fcda43833973b36fd496c47ab9bcaa0b888a89... problem with call to API - getting 403

▶git rebase --abort

▶git status

On branch log-in
Your branch is up-to-date with 'origin/log-in'.
nothing to commit, working tree clean

▶git rebase -i develop

The previous cherry-pick is now empty, possibly due to conflict resolution.
If you wish to commit it anyway, use:

    git commit --allow-empty

Otherwise, please use 'git reset'
interactive rebase in progress; onto bbea7dc
Last commands done (57 commands done):
   pick 3276950 initial DashboardContainer and Dashboard with isLoggedIn and loggedInMessage stubs
   pick f09fe8a initial DashboardContainer and Dashboard with isLoggedIn and loggedInMessage stubs
No commands remaining.
You are currently rebasing branch 'log-in' on 'bbea7dc'.

nothing to commit, working tree clean
Could not apply f09fe8a4c8ad88c89af3652cbf86693709f6c85a... initial DashboardContainer and Dashboard with isLoggedIn and loggedInMessage stubs

▶git commit --allow-empty

[detached HEAD e46eab1] initial DashboardContainer and Dashboard with isLoggedIn and loggedInMessage stubs
 Date: Sun May 28 16:13:29 2017 -0500

▶git status

interactive rebase in progress; onto bbea7dc
Last commands done (57 commands done):
   pick 3276950 initial DashboardContainer and Dashboard with isLoggedIn and loggedInMessage stubs
   pick f09fe8a initial DashboardContainer and Dashboard with isLoggedIn and loggedInMessage stubs
  (see more in file .git/rebase-merge/done)
No commands remaining.
You are currently editing a commit while rebasing branch 'w1-user-can-log-in' on 'bbea7dc'.
  (use "git commit --amend" to amend the current commit)
  (use "git rebase --continue" once you are satisfied with your changes)

nothing to commit, working tree clean   

▶git checkout登录

Warning: you are leaving 4 commits behind, not connected to
any of your branches:

  e46eab1 initial DashboardContainer and Dashboard with isLoggedIn and loggedInMessage stubs
  b850c05 initial DashboardContainer and Dashboard with isLoggedIn and loggedInMessage stubs
  2ebf59f initial DashboardContainer and Dashboard with isLoggedIn and loggedInMessage stubs
  37492d4 cleanup

If you want to keep them by creating a new branch, this may be a good time
to do so with:

 git branch <new-branch-name> e46eab1

Switched to branch 'log-in'
Your branch is up-to-date with 'origin/log-in'.

▶git status

On branch log-in
Your branch is up-to-date with 'origin/og-in'.
Last commands done (57 commands done):
   pick 3276950 initial DashboardContainer and Dashboard with isLoggedIn and loggedInMessage stubs
   pick f09fe8a initial DashboardContainer and Dashboard with isLoggedIn and loggedInMessage stubs
  (see more in file .git/rebase-merge/done)
No commands remaining.
You are currently editing a commit while rebasing branch 'log-in' on 'bbea7dc'.
  (use "git commit --amend" to amend the current commit)
  (use "git rebase --continue" once you are satisfied with your changes)

nothing to commit, working tree clean

▶git rebase - 继续

Successfully rebased and updated refs/heads/log-in.

▶git checkout e46eab1

Note: checking out 'e46eab1'.

You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by performing another checkout.

If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -b with the checkout command again. Example:

  git checkout -b <new-branch-name>

HEAD is now at e46eab1... initial DashboardContainer and Dashboard with isLoggedIn and loggedInMessage stubs

如何让自己重新登录 17b0a0f ?我已经不在了,不知何故,我做了些什么,以至于我失去了这些变化。

更新

▶git reflog | grep 17b0a0f

17b0a0f HEAD@{13}: rebase: aborting
17b0a0f HEAD@{14}: rebase -i (skip): updating HEAD
17b0a0f HEAD@{15}: commit: renamed user to auth across the board

整个REFLOG

e46eab1 HEAD@{0}: checkout: moving from log-in to e46eab1
0e0c8df HEAD@{1}: rebase -i (finish): returning to refs/heads/log-in
0e0c8df HEAD@{2}: rebase -i (finish): refs/heads/log-in onto bbea7dc251692b83b48165ad07facb49326b069a
0e0c8df HEAD@{3}: checkout: moving from e46eab1f17072d6f876d61da2c1830937f195512 to log-in
e46eab1 HEAD@{4}: commit (cherry-pick): initial DashboardContainer and Dashboard with isLoggedIn and loggedInMessage stubs
b850c05 HEAD@{5}: rebase -i (pick): initial DashboardContainer and Dashboard with isLoggedIn and loggedInMessage stubs
2ebf59f HEAD@{6}: rebase -i (pick): initial DashboardContainer and Dashboard with isLoggedIn and loggedInMessage stubs
37492d4 HEAD@{7}: rebase -i (pick): cleanup
a07cc17 HEAD@{8}: rebase -i (start): checkout develop
0e0c8df HEAD@{9}: rebase -i (abort): updating HEAD
0e0c8df HEAD@{10}: rebase: aborting
a07cc17 HEAD@{11}: rebase -i (start): checkout develop
0e0c8df HEAD@{12}: rebase -i (abort): updating HEAD
17b0a0f HEAD@{13}: rebase: aborting
17b0a0f HEAD@{14}: rebase -i (skip): updating HEAD
17b0a0f HEAD@{15}: commit: renamed user to auth across the board
0e0c8df HEAD@{16}: checkout: moving from a07cc17a8dc26861a487bdd66dd1deaa8a4454ed to log-in
a07cc17 HEAD@{17}: rebase -i (start): checkout develop
0e0c8df HEAD@{18}: pull: Merge made by the 'recursive' strategy.
3276950 HEAD@{19}: rebase -i (abort): updating HEAD
f09fe8a HEAD@{20}: rebase: aborting
f09fe8a HEAD@{21}: commit (amend): initial DashboardContainer and Dashboard with isLoggedIn and loggedInMessage stubs
3276950 HEAD@{22}: checkout: moving from a07cc17a8dc26861a487bdd66dd1deaa8a4454ed to log-in
a07cc17 HEAD@{23}: rebase -i (start): checkout develop
3276950 HEAD@{24}: commit: initial DashboardContainer and Dashboard with isLoggedIn and loggedInMessage stubs
f4a4c09 HEAD@{25}: commit: initial DashboardContainer and Dashboard with isLoggedIn and loggedInMessage stubs
1edb9a9 HEAD@{26}: rebase -i (abort): updating HEAD
1edb9a9 HEAD@{27}: rebase: aborting
a07cc17 HEAD@{28}: rebase -i (start): checkout develop
1edb9a9 HEAD@{29}: commit: cleanup
b010a31 HEAD@{30}: rebase -i (abort): updating HEAD
b010a31 HEAD@{31}: rebase: aborting
e63ad5a HEAD@{32}: rebase -i (continue): fixing rebase issu
df9db35 HEAD@{33}: rebase -i (squash): # This is a combination of 7 commits.
7560ff4 HEAD@{34}: rebase -i (squash): # This is a combination of 6 commits.
24131dd HEAD@{35}: rebase -i (squash): # This is a combination of 5 commits.
4b09cfe HEAD@{36}: rebase -i (squash): # This is a combination of 4 commits.
a77cd5b HEAD@{37}: rebase -i (squash): # This is a combination of 3 commits.
94e6cf0 HEAD@{38}: rebase -i (squash): # This is a combination of 2 commits.
b67d752 HEAD@{39}: rebase -i (reword): refactored to use react-router v4. Updated tests to work with react-router4, removed old unecessary session values, added stubs for auth features
f4539f0 HEAD@{40}: cherry-pick: fast-forward
5711629 HEAD@{41}: rebase -i (start): checkout develop
b010a31 HEAD@{42}: commit (merge): fixed merge conflict
a07cc17 HEAD@{43}: commit: added <Provider /> back into new reac-router v4 implementation to pesist store
afadad7 HEAD@{44}: commit: updated unit test for App to Render using react-router v4
fa005f4 HEAD@{45}: commit: fixed tests by removing spiked code
2a6db76 HEAD@{46}: commit: fixed test, added additional asset to test unit
4187519 HEAD@{47}: commit: cleanup
4bede93 HEAD@{48}: rebase -i (finish): returning to refs/heads/log-in
4bede93 HEAD@{49}: rebase -i (pick): removed all instances of session - not needed
f4539f0 HEAD@{50}: rebase -i (pick): fixed login test
5711629 HEAD@{51}: rebase -i (pick): added integration test script to package.json
41168fb HEAD@{52}: rebase -i (pick): problem with call to API - getting 403

1 个答案:

答案 0 :(得分:0)

git reset --hard 17b0a0f工作。