Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Squashing commits is easy - splitting is hard #8

Open
larsbrinkhoff opened this issue Jan 23, 2019 · 9 comments
Open

Squashing commits is easy - splitting is hard #8

larsbrinkhoff opened this issue Jan 23, 2019 · 9 comments

Comments

@larsbrinkhoff
Copy link
Owner

No description provided.

@Alexey-Slyusar
Copy link
Collaborator

Hi Lars! I am trying to squash https://github.com/PDP-10/its/commits/alexey/logoguide commits by
git rebase -i master
and receive
fatal: Needed a single revision
Could you please suggest what do I wrong?

@larsbrinkhoff
Copy link
Owner Author

That's strange. Don't you have a local branch called master? Try this instead: git rebase -i origin/master

@larsbrinkhoff
Copy link
Owner Author

What is the output from git branch -r? This should list all branches, local and remote.

@Alexey-Slyusar
Copy link
Collaborator

It seems that git rebase -i origin/master works. Thank you!
This is output from git branch -r
alexey@ITS:~/git-learning/its/doc$ git branch -r

  origin/HEAD -> origin/master
  origin/alexey/11logo
  origin/alexey/CLOGO
  origin/alexey/logoguide
  origin/ats/ethernet
  origin/ats/expecthack
  origin/ats/spaces
  origin/ats/zork
  origin/ejs/add_es_ex
  origin/ejs/arcdev71
  origin/ejs/bday_names
  origin/ejs/chater
  origin/ejs/compiler2
  origin/ejs/ctimsr
  origin/ejs/eigen2
  origin/ejs/emacs_patches
  origin/ejs/exthuk
  origin/ejs/fix_primer2
  origin/ejs/games2
  origin/ejs/games4
  origin/ejs/games5
  origin/ejs/games6
  origin/ejs/george
  origin/ejs/gt40
  origin/ejs/inquir2
  origin/ejs/inqupd_129
  origin/ejs/jotto
  origin/ejs/jotto2
  origin/ejs/lins_1500
  origin/ejs/lisp_update
  origin/ejs/llogo
  origin/ejs/macsym_doc
  origin/ejs/macsym_primer
  origin/ejs/macsyma_build
  origin/ejs/macsyma_fixes
  origin/ejs/macsyma_manual
  origin/ejs/mldev_1467
  origin/ejs/mlmac
  origin/ejs/netrts_1516
  origin/ejs/no_exclude_edlm
  origin/ejs/papsav_1029
  origin/ejs/papsav_1451
  origin/ejs/papsav_1451_3
  origin/ejs/papsav_1454
  origin/ejs/papsav_1456
  origin/ejs/rmailx_1093
  origin/ejs/scrmbl
  origin/ejs/teach
  origin/ejs/ticket1012
  origin/ejs/ticket990_962
  origin/ejs/ticket_1112
  origin/ejs/ticket_1125a
  origin/ejs/ticket_1154
  origin/ejs/ticket_1209
  origin/ejs/ticket_1211
  origin/ejs/ticket_1271
  origin/ejs/ticket_1284
  origin/ejs/ticket_1285
  origin/ejs/ticket_1286
  origin/ejs/ticket_1287
  origin/ejs/ticket_1288
  origin/ejs/ticket_1289
  origin/ejs/ticket_1303
  origin/ejs/ticket_1318
  origin/ejs/ticket_1337
  origin/ejs/ticket_1442
  origin/ejs/ticket_1443
  origin/ejs/ticket_1520
  origin/ejs/ticket_284
  origin/ejs/ticket_706
  origin/ejs/ticket_710
  origin/ejs/ticket_713
  origin/ejs/ticket_977
  origin/ejs/transs
  origin/ejs/transs3
  origin/ejs/tsetup
  origin/ejs/update_macsyma
  origin/ejs/uptini
  origin/ejs/vsaid_ttyvar
  origin/ejs/yahtze
  origin/lars/11stnk
  origin/lars/340
  origin/lars/8048
  origin/lars/8080
  origin/lars/chaos
  origin/lars/chat
  origin/lars/chess
  origin/lars/cube
  origin/lars/daylight
  origin/lars/dazzle
  origin/lars/dcg
  origin/lars/debug-tm03
  origin/lars/deuna
  origin/lars/distst
  origin/lars/dpk
  origin/lars/dragon
  origin/lars/dsdp
  origin/lars/dungeon-supnik
  origin/lars/dunnet
  origin/lars/ethernet
  origin/lars/fdits
  origin/lars/flight
  origin/lars/float
  origin/lars/freeway
  origin/lars/gfr
  origin/lars/gitlab
  origin/lars/h3make
  origin/lars/hang
  origin/lars/imlac
  origin/lars/imsim
  origin/lars/imx
  origin/lars/ioelev.411
  origin/lars/kaimp
  origin/lars/katcpip
  origin/lars/lc-its
  origin/lars/lhdh
  origin/lars/macos
  origin/lars/mgvtck
  origin/lars/midas
  origin/lars/minsys
  origin/lars/munching
  origin/lars/nampic
  origin/lars/netime
  origin/lars/nmtape
  origin/lars/no
  origin/lars/old
  origin/lars/old-emacs
  origin/lars/omidas
  origin/lars/ooits
  origin/lars/pdp6
  origin/lars/pornis
  origin/lars/raygun
  origin/lars/readme
  origin/lars/shrdlu
  origin/lars/simple41
  origin/lars/snyder
  origin/lars/sst
  origin/lars/sst21
  origin/lars/stage2
  origin/lars/stinkr
  origin/lars/stk
  origin/lars/stuga
  origin/lars/tapex
  origin/lars/tofci
  origin/lars/tt-its
  origin/lars/tvread
  origin/lars/tvwar
  origin/lars/vt100
  origin/lars/war11
  origin/lars/xfile
  origin/master
  origin/osx-build
  origin/popeyes
  origin/syseng-1973
  origin/ticket_1444
  origin/user/budd
  origin/user/lars
  origin/vt100

@larsbrinkhoff
Copy link
Owner Author

Thanks. My mistake, though. What does git branch (without -r) say? Probably it won't list master in which case you never checked out the master branch. You don't have to, and they you'll have to refer to origin/master instead.

@Alexey-Slyusar
Copy link
Collaborator

Alexey-Slyusar commented Feb 2, 2019

It seems that I messed up the things finally. So "If you mess up, don't panic" section of the fearless-git was very helpful. Thank you Lars, it is very kind of you to put such section here.

@Alexey-Slyusar
Copy link
Collaborator

Alexey-Slyusar commented Feb 2, 2019

Probably it won't list master in which case you never checked out the master branch. You don't have to, and they you'll have to refer to origin/master instead.

Yes, that is right. It isn't list master. Thank you!

@larsbrinkhoff
Copy link
Owner Author

Of course! Being able to recover from mistakes is very important.

@Alexey-Slyusar
Copy link
Collaborator

It is squased now. Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants