Loading
#openttdcoop - Paste
Archives
Trending
Docs
Login
ABAP
ActionScript
ActionScript 3
Ada
AIMMS3
ALGOL 68
Apache configuration
AppleScript
Apt sources
ARM ASSEMBLER
ASM
ASP
asymptote
Autoconf
Autohotkey
AutoIt
AviSynth
awk
BASCOM AVR
Bash
Basic4GL
BibTeX
BlitzBasic
bnf
Boo
Brainfuck
C
C#
C (LoadRunner)
C (Mac)
C (WinAPI)
C++
C++ (Qt)
C++ (WinAPI)
CAD DCL
CAD Lisp
CFDG
ChaiScript
Chapel
CIL
Clojure
CMake
COBOL
CoffeeScript
ColdFusion
CSS
Cuesheet
D
Dart
DCL
DCPU-16 Assembly
DCS
Delphi
Diff
DIV
DOS
dot
E
ECMAScript
Eiffel
eMail (mbox)
EPC
Erlang
Euphoria
EZT
F#
Falcon
FO (abas-ERP)
Formula One
Fortran
FreeBasic
FreeSWITCH
GADV 4CS
GAMBAS
GDB
genero
Genie
glSlang
GML
GNU/Octave
GNU Gettext
GNU make
Gnuplot
Go
Groovy
GwBasic
Haskell
Haxe
HicEst
HQ9+
HTML
HTML5
Icon
INI
Inno
INTERCAL
Io
ISPF Panel
J
Java
Java(TM) 2 Platform Standard Edition 5.0
Javascript
JCL
jQuery
KiXtart
KLone C
KLone C++
LaTeX
LDIF
Liberty BASIC
Lisp
LLVM Intermediate Representation
Locomotive Basic
Logtalk
LOLcode
Lotus Notes @Formulas
LotusScript
LScript
LSL2
Lua
MagikSF
MapBasic
Matlab M
Microchip Assembler
Microsoft Registry
mIRC Scripting
MMIX
Modula-2
Modula-3
MOS 6502 (6510) ACME Cross Assembler format
MOS 6502 (6510) Kick Assembler format
MOS 6502 (6510) TASM/64TASS 1.46 Assembler format
Motorola 68000 - HiSoft Devpac ST 2 Assembler format
Motorola 68000 Assembler
MXML
MySQL
Nagios
NetRexx
newlisp
nginx
Nimrod
NML NewGRF Meta Language
NSIS
Oberon-2
Objeck Programming Language
Objective-C
OCaml
OCaml (brief)
ooRexx
OpenBSD Packet Filter
OpenOffice.org Basic
Oracle 8 SQL
Oracle 11 SQL
Oxygene
OZ
ParaSail
PARI/GP
Pascal
PCRE
per
Perl
Perl 6
PHP
PHP (brief)
PIC16
Pike
Pixel Bender 1.0
PL/I
PL/SQL
PostgreSQL
PostScript
POVRAY
PowerBuilder
PowerShell
ProFTPd configuration
Progress
Prolog
PROPERTIES
ProvideX
Puppet
PureBasic
Python
Python for S60
q/kdb+
QBasic/QuickBASIC
QML
R / S+
Racket
Rails
RBScript
REBOL
rexx
robots.txt
RPM Specification File
Ruby
Rust
SAS
Scala
Scheme
SciLab
SCL
sdlBasic
Smalltalk
Smarty
SPARK
SPARQL
SQL
Squirrel Script
Squirrel Script with OpenTTD AI/GS
StandardML
StoneScript
SystemVerilog
T-SQL
TCL
Tera Term Macro
Text
thinBasic
TypoScript
Unicon (Unified Extended Dialect of Icon)
Uno Idl
Unreal Script
UPC
Urbi
Vala
vb.net
VBScript
Vedit macro language
Verilog
VHDL
Vim Script
Visual Basic
Visual Fox Pro
Visual Prolog
Whitespace
Whois (RPSL format)
Winbatch
X++
XBasic
XML
Xorg configuration
YAML
ZiLOG Z80 Assembler
ZXBasic
[21:59 lordaro@Donald coding] > git init git-test Initialized empty Git repository in /home/lordaro/coding/git-test/.git/ [21:59 lordaro@Donald coding] > cd git-test/ [21:59 lordaro@Donald git-test] > ls [21:59 lordaro@Donald git-test] > vim file [22:00 lordaro@Donald git-test] > git add file [22:00 lordaro@Donald git-test] > git commit -m "init" [master (root-commit) 4ebeefd] init 1 file changed, 1 insertion(+) create mode 100644 file [22:00 lordaro@Donald git-test] > git checkout -b n1 Switched to a new branch 'n1' [22:06 lordaro@Donald git-test] > vim file [22:06 lordaro@Donald git-test] > git add -u [22:06 lordaro@Donald git-test] > git cim "x1" [n1 144b75a] x1 1 file changed, 1 insertion(+), 1 deletion(-) [22:07 lordaro@Donald git-test] > vim file [22:07 lordaro@Donald git-test] > git cam "x2" [n1 020d1aa] x2 1 file changed, 1 insertion(+), 1 deletion(-) [22:07 lordaro@Donald git-test] > git checkout -b n2 Switched to a new branch 'n2' [22:07 lordaro@Donald git-test] > vim file [22:07 lordaro@Donald git-test] > git cam "x3" [n2 3864bf0] x3 1 file changed, 1 insertion(+), 1 deletion(-) [22:08 lordaro@Donald git-test] > vim file [22:08 lordaro@Donald git-test] > git cam "x4" [n2 6d8a031] x4 1 file changed, 1 insertion(+), 1 deletion(-) [22:08 lordaro@Donald git-test] > # oh noes, a review, we need a new commit before x1 [22:08 lordaro@Donald git-test] > git co n1 Switched to branch 'n1' [22:08 lordaro@Donald git-test] > git co n2 Switched to branch 'n2' [22:10 lordaro@Donald git-test] > git lg -5 * 6d8a031 - (HEAD -> n2) x4 (2 minutes ago)<Charles Pigott> * 3864bf0 - x3 (2 minutes ago)<Charles Pigott> * 020d1aa - (n1) x2 (3 minutes ago)<Charles Pigott> * 144b75a - x1 (4 minutes ago)<Charles Pigott> * 4ebeefd - (master) init (11 minutes ago)<Charles Pigott> [22:10 lordaro@Donald git-test] > git co n1 Switched to branch 'n1' [22:10 lordaro@Donald git-test] > git lg -5 * 020d1aa - (HEAD -> n1) x2 (3 minutes ago)<Charles Pigott> * 144b75a - x1 (4 minutes ago)<Charles Pigott> * 4ebeefd - (master) init (11 minutes ago)<Charles Pigott> [22:11 lordaro@Donald git-test] > vim file [22:20 lordaro@Donald git-test] > git cam "y1" [n1 a539601] y1 1 file changed, 1 insertion(+), 1 deletion(-) [22:20 lordaro@Donald git-test] > git rebase -i master # reorder commits error: could not apply a539601... y1 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 a539601df7356a15586c8ec6c752d5c2ae944cad... y1 [22:20 lordaro@Donald git-test] > vim file [22:20 lordaro@Donald git-test] > git add -u [22:20 lordaro@Donald git-test] > git rebase --continue [detached HEAD ee36328] y1 1 file changed, 1 insertion(+), 1 deletion(-) error: could not apply 144b75a... x1 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 144b75a40abf59482fda5019f9f5c2c8201b0a3a... x1 [22:21 lordaro@Donald git-test] > vim file [22:21 lordaro@Donald git-test] > git add -u [22:21 lordaro@Donald git-test] > git rebase --continue [detached HEAD 3533c6a] x1 1 file changed, 1 insertion(+), 1 deletion(-) Successfully rebased and updated refs/heads/n1. [22:21 lordaro@Donald git-test] > git lg -5 * b17aa11 - (HEAD -> n1) x2 (5 seconds ago)<Charles Pigott> * 3533c6a - x1 (6 seconds ago)<Charles Pigott> * ee36328 - y1 (22 seconds ago)<Charles Pigott> * 4ebeefd - (master) init (21 minutes ago)<Charles Pigott> [22:21 lordaro@Donald git-test] > git checkout n2 Switched to branch 'n2' [22:21 lordaro@Donald git-test] > git lg -5 * 6d8a031 - (HEAD -> n2) x4 (13 minutes ago)<Charles Pigott> * 3864bf0 - x3 (13 minutes ago)<Charles Pigott> * 020d1aa - x2 (14 minutes ago)<Charles Pigott> * 144b75a - x1 (14 minutes ago)<Charles Pigott> * 4ebeefd - (master) init (21 minutes ago)<Charles Pigott> [22:21 lordaro@Donald git-test] > # ^ note the hashes - these are the "old" commits from before [22:22 lordaro@Donald git-test] > # n1 was rebased (and rewritten) [22:22 lordaro@Donald git-test] > git rebase -i n1 Successfully rebased and updated refs/heads/n2. [22:23 lordaro@Donald git-test] > git lg -5 * 0c91533 - (HEAD -> n2) x4 (9 seconds ago)<Charles Pigott> * f7733cc - x3 (10 seconds ago)<Charles Pigott> * b17aa11 - (n1) x2 (2 minutes ago)<Charles Pigott> * 3533c6a - x1 (2 minutes ago)<Charles Pigott> * ee36328 - y1 (2 minutes ago)<Charles Pigott> [22:23 lordaro@Donald git-test] > # tada! how did i do this? by the magic of deleting the old "dead" commits [22:23 lordaro@Donald git-test] > # from the rebase list, as those are old commits and we don't want those anymore [22:24 lordaro@Donald git-test] >
Mark as private
for 30 minutes
for 6 hours
for 1 day
for 1 week
for 1 month
for 1 year
forever