Live data from Hacker News

Challenger and learning Git rebase and resolve conflics

news.ycombinator.com

1–2 of 2 posts

Challenger and learning Git rebase and resolve conflics

#1
# Here is the code:

# Challenge and learning Git rebase and resolve conflics

# you need to order into the master branch either git history and content of other two branches without adicional commits in history line.

# you can see result of this graph with 'gitx'

mkdir challenge_rebase; cd challenge_rebase

git init; touch content.txt; git add .;

echo 'A' >> content.txt; git commit -a -m 'A';

echo 'B' >> content.txt; git commit -a -m 'B';

git checkout -b foo master;

echo 'C' >> content.txt; git commit -a -m 'C';

echo 'D' >> content.txt; git commit -a -m 'D';

echo 'E' >> content.txt; git commit -a -m 'E';

echo 'F' >> content.txt; git commit -a -m 'F';

git checkout -b bar master;

echo 'G' >> content.txt; git commit -a -m 'G';

echo 'H' >> content.txt; git commit -a -m 'H';

echo 'I' >> content.txt; git commit -a -m 'I';

echo 'J' >> content.txt; git commit -a -m 'J';

git checkout master;

echo 'L' >> content.txt; git commit -a -m 'L';

echo 'M' >> content.txt; git commit -a -m 'M';

echo 'N' >> content.txt; git commit -a -m 'N';

# What is correct response to make order into the master branch either git history and content of other two branches without adicional commits in history line?