Difference between revisions of "Tutorial Git Branch"

From HaFrWiki
Jump to: navigation, search
(Created page with "{{TOCright}} == Introduction == == Setup == Setup a new repo with the initial data. <syntaxhighlight lang="bash"> $ mkdir gitbranch $ cd gitbranch/ # Initialize git. $ git...")
 
m (Setup)
Line 8: Line 8:
 
<syntaxhighlight lang="bash">
 
<syntaxhighlight lang="bash">
 
$ mkdir gitbranch
 
$ mkdir gitbranch
$ cd gitbranch/
+
$ cd gitbranch
  
 
# Initialize git.
 
# Initialize git.

Revision as of 16:54, 9 July 2017

Introduction

Setup

Setup a new repo with the initial data.

<syntaxhighlight lang="bash"> $ mkdir gitbranch $ cd gitbranch

  1. Initialize git.

$ git init Initialized empty Git repository in /Test/gitbranch/.git/

  1. Creating the initial content

$ echo Original Init Data Master >> data $ git add data $ git commit -m "Introduction" [master (root-commit) 551517e] Introduction

1 file changed, 1 insertion(+)
create mode 100644 data
  1. Check the status

$ git status On branch master nothing to commit, working directory clean </syntaxhighlight>

Create branch

See also

top

Reference

top