openxc / shiftknob-android

Android application to control the OpenXC-enabled Haptic Shift Knob
BSD 3-Clause "New" or "Revised" License
6 stars 1 forks source link

Compiles with Android Studio. #5

Closed DaveMelcher closed 8 years ago

DaveMelcher commented 8 years ago

Runs with Enabler 6.0.6

peplin commented 8 years ago

This PR deletes all of the code :bomb: :)

DaveMelcher commented 8 years ago

Well, that didn't go right.

peplin commented 8 years ago

Not to over complicate things again, but those 2 commits should probably be squashed into 1 so the history of the file isn't disjoint.

It should be as simple as:

DaveMelcher commented 8 years ago

I got as far as step 2, now I have a rebase in progress. I tried...

git rebase --continue cat: c:/Users/DMELCHE6/Documents/GitHub/shiftknob-android/.git/rebase-merge/stopped-sha: No such file or directory Cannot 'squash' without a previous commit

In step 2, I replaced "pick 8e3914c Now with code!" with "s 8e3914c Now with code!", is that what you meant?

DaveMelcher commented 8 years ago

Oh, missed an error message:

git rebase -i HEAD~1 Cannot 'squash' without a previous commit

peplin commented 8 years ago

That's odd, it sounds like your local copy isn't at the HEAD of this branch. What is the out of git status?

DaveMelcher commented 8 years ago

Starting from the beginning...

[studio2 +8 ~0 -0 !]> git status
On branch studio2
Your branch is up-to-date with 'origin/studio2'.

[studio2 +8 ~0 -0 !]> git log
commit 8e3914cccf957934ce9c16dddf712e5ec51722de
Author: DaveMelcher <dmelche6@ford.com>
Date:   Mon Oct 26 17:51:28 2015 -0400

    Now with code!

commit 6efbda98eaa8bc34e8a9b91b31d43b2a7dedc222
Author: DaveMelcher <dmelche6@ford.com>
Date:   Mon Oct 26 17:43:02 2015 -0400

    Compiles with Android Studio.
    Runs with Enabler 6.0.6

commit 551549660c16dc822a27d8584a472db2e3efb032
Author: Zac Nelson <znelson1@ford.com>
Date:   Thu Jan 8 13:26:19 2015 -0500

    update to v6.0.4 of openxc-android.
etc.....
[studio2 +8 ~0 -0 !]> git rebase -i HEAD~1

In the comment that opens, changed "pick 8e3914c Now with code!" to "s 8e3914c Now with code!", saved, and exited.

Got the response: Cannot 'squash' without a previous commit

rebase in progress; onto 6efbda9
You are currently editing a commit while rebasing branch 'studio2' on '6efbda9'.

  (use "git commit --amend" to amend the current commit)
  (use "git rebase --continue" once you are satisfied with your changes)

[studio2|REBASE-i +8 ~0 -0!]> git log
commit 6efbda98eaa8bc34e8a9b91b31d43b2a7dedc222
Author: DaveMelcher dmelche6@ford.com
Date:   Mon Oct 26 17:43:02 2015 -0400

Compiles with Android Studio. Runs with Enabler 6.0.6


commit 551549660c16dc822a27d8584a472db2e3efb032
Author: Zac Nelson znelson1@ford.com
Date:   Thu Jan 8 13:26:19 2015 -0500

update to v6.0.4 of openxc-android.


etc....
``

```[studio2|REBASE-i +8 ~0 -0!]> git rebase --continue
cat: c:/Users/DMELCHE6/Documents/GitHub/shiftknob-android/.git/rebase-merge/stop
ped-sha: No such file or directory
Cannot 'squash' without a previous commit

[studio2|REBASE-i +8 ~0 -0!]> git rebase --abort
[studio2 +8 ~0 -0 !]>
peplin commented 8 years ago

Sorry, one mistake on my part - you need to run rebase -i HEAD~2 to back 2 commits. The issue is that with only one commit in the rebase, you are asking git to squash 8e3914c into nothing. That's what the "can't rebase without previous commit" error means. You should see 2 commits in the editor like this:

pick 6efbda9 Compiles with Android Studio. Runs with Enabler 6.0.6    
pick 8e3914c Now with code!

# Rebase 5515496..8e3914c onto 5515496 (2 command(s))

and you want to change the 2nd commit to "squash":

pick 6efbda9 Compiles with Android Studio. Runs with Enabler 6.0.6    
s 8e3914c Now with code!

# Rebase 5515496..8e3914c onto 5515496 (2 command(s))
peplin commented 8 years ago

Bingo!