Created
January 21, 2013 11:30
-
-
Save Wilfred/4585428 to your computer and use it in GitHub Desktop.
using vNEXT in a README with feature branches in git
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ mkdir example_project_2 | |
$ cd example_project_2 | |
$ git init | |
Initialized empty Git repository in /tmp/example_project_2/.git/ | |
$ nano README.md | |
$ more README.md | |
## vNEXT | |
$ git add README.md | |
$ git commit -m "initial commit" | |
[master (root-commit) 0014408] initial commit | |
1 file changed, 1 insertion(+) | |
create mode 100644 README.md | |
$ git checkout -b feature-1 | |
Switched to a new branch 'feature-1' | |
$ nano README.md | |
$ git diff | |
diff --git a/README.md b/README.md | |
index 7a383cd..f775bf2 100644 | |
--- a/README.md | |
+++ b/README.md | |
@@ -1 +1,3 @@ | |
## vNEXT | |
+ | |
+* Added a feature | |
$ more README.md | |
## vNEXT | |
* Added a feature | |
$ git commit -am "added a feature" | |
[feature-1 6b4118b] added a feature | |
1 file changed, 2 insertions(+) | |
$ git checkout master | |
Switched to branch 'master' | |
$ git checkout -b bugfix-2 | |
Switched to a new branch 'bugfix-2' | |
$ nano README.md | |
$ more README.md | |
## vNEXT | |
* Fixed a bug | |
$ git commit -am "fixed a bug" | |
[bugfix-2 f6bf98c] fixed a bug | |
1 file changed, 2 insertions(+) | |
$ git checkout master | |
Switched to branch 'master' | |
$ git merge feature-1 | |
Updating 0014408..6b4118b | |
Fast-forward | |
README.md | 2 ++ | |
1 file changed, 2 insertions(+) | |
$ git merge bugfix-2 | |
Auto-merging README.md | |
CONFLICT (content): Merge conflict in README.md | |
Automatic merge failed; fix conflicts and then commit the result. | |
$ more README.md | |
## vNEXT | |
<<<<<<< HEAD | |
* Added a feature | |
======= | |
* Fixed a bug | |
>>>>>>> bugfix-2 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment