Initialised empty Git repository in /home/bojan/dev/test/.git/
On branch master
No commits yet
nothing to commit (create/copy files and use "git add" to track)
On branch master
No commits yet
Untracked files:
(use "git add <file>..." to include in what will be committed)
foo.txt
nothing added to commit but untracked files present (use "git add" to track)
On branch master
No commits yet
Changes to be committed:
(use "git rm --cached <file>..." to unstage)
new file: foo.txt
[master (root-commit) ae68f9e] Added feature A
1 file changed, 5 insertions(+)
create mode 100644 foo.txt
Switched to a new branch 'feature/B'
A.1
A.2
A.3
}
feature B {
B.1
B.2 - bug
B.3
}
On branch feature/B
Changes not staged for commit:
(use "git add <file>..." to update what will be committed)
(use "git restore <file>..." to discard changes in working directory)
modified: foo.txt
no changes added to commit (use "git add" and/or "git commit -a")
feature A {
A.1
A.2
A.3
}
feature B {
B.1
B.2 - bug
B.3
}
[feature/B c2f2c7d] Added feature B
1 file changed, 6 insertions(+)
commit c2f2c7d39fb93b3fb45ec9ff384e0ebd5303253d (HEAD -> feature/B)
Author: Bojan Komazec <bojan.komazec@example.com>
Date: Mon Aug 8 21:36:48 2022 +0100
Added feature B
commit ae68f9ea4bf55f54a8f40831df5b980dc30e5c6e (master)
Author: Bojan Komazec <bojan.komazec@example.com>
Date: Mon Aug 8 21:34:20 2022 +0100
Added feature A
Current branch feature/B is up to date.
Switched to branch 'master'
Updating ae68f9e..c2f2c7d
Fast-forward
foo.txt | 6 ++++++
1 file changed, 6 insertions(+)
commit c2f2c7d39fb93b3fb45ec9ff384e0ebd5303253d (HEAD -> master, feature/B)
Author: Bojan Komazec <bojan.komazec@example.com>
Date: Mon Aug 8 21:36:48 2022 +0100
Added feature B
commit ae68f9ea4bf55f54a8f40831df5b980dc30e5c6e
Author: Bojan Komazec <bojan.komazec@example.com>
Date: Mon Aug 8 21:34:20 2022 +0100
Added feature A
[master cd72121] Revert "Added feature B"
1 file changed, 6 deletions(-)
commit cd721217e154dc74cad4037135c0ea2c0b898696 (HEAD -> master)
Author: Bojan Komazec <bojan.komazec@example.com>
Date: Mon Aug 8 21:42:57 2022 +0100
Revert "Added feature B"
This reverts commit c2f2c7d39fb93b3fb45ec9ff384e0ebd5303253d.
commit c2f2c7d39fb93b3fb45ec9ff384e0ebd5303253d (feature/B)
Author: Bojan Komazec <bojan.komazec@example.com>
Date: Mon Aug 8 21:36:48 2022 +0100
Added feature B
commit ae68f9ea4bf55f54a8f40831df5b980dc30e5c6e
Author: Bojan Komazec <bojan.komazec@example.com>
Date: Mon Aug 8 21:34:20 2022 +0100
Added feature A
Switched to branch 'feature/B'
Switched to a new branch 'feature/B2'
feature A {
A.1
A.2
A.3
}
feature B {
B.1
B.2 - bug
B.3
}
foo.txt:
feature A {
A.1
A.2
A.3
}
feature B {
B.1
B.2 - bug fixed
B.3
}
On branch feature/B2
Changes not staged for commit:
(use "git add <file>..." to update what will be committed)
(use "git restore <file>..." to discard changes in working directory)
modified: foo.txt
no changes added to commit (use "git add" and/or "git commit -a")
[feature/B2 29dbed4] Fixed bug in feature B
1 file changed, 1 insertion(+), 1 deletion(-)
On branch feature/B2
nothing to commit, working tree clean
feature A {
A.1
A.2
A.3
}
feature B {
B.1
B.2 - bug fixed
B.3
}
Before we merge feature branch to trunk, we first want to rebase it:
Auto-merging foo.txt
CONFLICT (content): Merge conflict in foo.txt
error: could not apply 29dbed4... Fixed bug in feature B
Resolve all conflicts manually, mark them as resolved with
"git add/rm <conflicted_files>", then run "git rebase --continue".
You can instead skip this commit: run "git rebase --skip".
To abort and get back to the state before "git rebase", run "git rebase --abort".
Could not apply 29dbed4... Fixed bug in feature B
$ git add foo.txt
[detached HEAD b86cff8] Fixed bug in feature B
1 file changed, 7 insertions(+)
Successfully rebased and updated refs/heads/feature/B2.
commit b86cff82118bb6af2bf10a4adf584e924acaaed0 (HEAD -> feature/B2)
Author: Bojan Komazec <bojan.komazec@example.com>
Date: Mon Aug 8 21:47:55 2022 +0100
Fixed bug in feature B
commit cd721217e154dc74cad4037135c0ea2c0b898696 (master)
Author: Bojan Komazec <bojan.komazec@example.com>
Date: Mon Aug 8 21:42:57 2022 +0100
Revert "Added feature B"
This reverts commit c2f2c7d39fb93b3fb45ec9ff384e0ebd5303253d.
commit c2f2c7d39fb93b3fb45ec9ff384e0ebd5303253d (feature/B)
Author: Bojan Komazec <bojan.komazec@example.com>
Date: Mon Aug 8 21:36:48 2022 +0100
Added feature B
commit ae68f9ea4bf55f54a8f40831df5b980dc30e5c6e
Author: Bojan Komazec <bojan.komazec@example.com>
Date: Mon Aug 8 21:34:20 2022 +0100
Added feature A
On branch feature/B2
nothing to commit, working tree clean
Switched to branch 'master'
On branch master
nothing to commit, working tree clean
commit cd721217e154dc74cad4037135c0ea2c0b898696 (HEAD -> master)
Author: Bojan Komazec <bojan.komazec@example.com>
Date: Mon Aug 8 21:42:57 2022 +0100
Revert "Added feature B"
This reverts commit c2f2c7d39fb93b3fb45ec9ff384e0ebd5303253d.
commit c2f2c7d39fb93b3fb45ec9ff384e0ebd5303253d (feature/B)
Author: Bojan Komazec <bojan.komazec@example.com>
Date: Mon Aug 8 21:36:48 2022 +0100
Added feature B
commit ae68f9ea4bf55f54a8f40831df5b980dc30e5c6e
Author: Bojan Komazec <bojan.komazec@example.com>
Date: Mon Aug 8 21:34:20 2022 +0100
Added feature A
Updating cd72121..b86cff8
Fast-forward
foo.txt | 7 +++++++
1 file changed, 7 insertions(+)
On branch master
nothing to commit, working tree clean
feature A {
A.1
A.2
A.3
}
feature B {
B.1
B.2 - bug fixed
B.3
}