Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Sun 20 Apr 2014, 05:20
All times are UTC - 4
 Forum index » House Training » HOWTO ( Solutions )
Howto git PART 3
Moderators: Flash, Ian, JohnMurga
Post new topic   Reply to topic View previous topic :: View next topic
Page 1 of 1 [1 Post]  
Author Message
Karl Godt


Joined: 20 Jun 2010
Posts: 3860
Location: Kiel,Germany

PostPosted: Tue 17 Dec 2013, 22:26    Post subject:  Howto git PART 3
Subject description: git branch
 

Continuing from Howto git PART 2

Where are we ?
We are back in the
puppylinux-woof-CE.d
that we created at Howto git PART 1
and again in the xterminal urxvt or xterm .
# pwd
command shows
/root/puppylinux-woof-CE.d

and
# ls -1a
.
..
.git
kernel-kit
LICENSE
merge2out
README
README-FIRST
vcs-workarounds
woof-arch
woof-code
woof-distro


Code:
git branch
shows
firmware
* master
testing


-- the asterix * indicating the current file status that would open in geany texteditor .

Code:
git log
shows as of today
Code:
commit 94a36111339d2ec03a65f44be9225b266202d56d
Author: mavrothal <mavrothal@yahoo.com>
Date:   Wed Dec 18 03:43:58 2013 +0800

    Revert "Move all-firmware to modem-firmware"
   
    This reverts commit 139c3b69a9e2b5c4a901167a891f98eda0e39df8.

less is the default git pager and I don't know any good equivalent .
Setting the pager to e3 or mp is something for masochists .


Now it is time to create a branch, let's name it playground :
Code:
git branch playground
which does not respond anything to the console ..
Where are we ?
Again

git branch
firmware
* master
playground
testing

tells us we are still in master .
So on with switching to the new branch playground :
Code:
git checkout playground
responds
Switched to branch 'playground'
Code:
git log
again shows
commit 94a36111339d2ec03a65f44be9225b266202d56d
Author: mavrothal <mavrothal@yahoo.com>
Date: Wed Dec 18 03:43:58 2013 +0800

Revert "Move all-firmware to modem-firmware"

This reverts commit 139c3b69a9e2b5c4a901167a891f98eda0e39df8.


-- the same commit level as the branch that was switched from .

git branch again gives us the asterix * now before playground :
firmware
master
* playground
testing


Now it's about time to switch to the testing branch and delete the playground branch :
Code:
git checkout testing

Switched to branch 'testing'

git log is showing
commit 9c6a9b0bce772af7b5bb473672b77a51d7abaa1e
Merge: ea14655 9132f26
Author: mavrothal <mavrothal@users.noreply.github.com>
Date: Tue Dec 17 11:48:48 2013 -0800

Merge pull request #244 from KarlGodt/mavrothal-woof-CE-testing

/usr/sbin/shutdownconfig : Handle SAVEMARK file in subdirectory

because it has a different commit level than the other branch , in this case it is further ahead .

Now about to delete the playground branch :
Code:
git branch -D playground
gives us
Deleted branch playground (was 94a3611).


LAST for this lesson :
We create the playground branch again,
now from the testing branch
and submit the new branch to our fork at github.com :
# git branch
firmware
master
* testing

Code:
git checkout -b playground

Switched to a new branch 'playground'
git checkout -b is short for "git branch;git checkout"

# git branch
firmware
master
* playground
testing

# git log
commit 9c6a9b0bce772af7b5bb473672b77a51d7abaa1e
Merge: ea14655 9132f26
Author: mavrothal <mavrothal@users.noreply.github.com>
Date: Tue Dec 17 11:48:48 2013 -0800

Merge pull request #244 from KarlGodt/mavrothal-woof-CE-testing

/usr/sbin/shutdownconfig : Handle SAVEMARK file in subdirectory


Code:
git remote -v
tells us
woofce https://github.com/puppylinux-woof-CE/woof-CE (fetch)
woofce https://github.com/puppylinux-woof-CE/woof-CE (push)

so it needs to setup another remote - our pup-noob remote fork by
Code:
git remote add pup-noob https://github.com/pup-noob/woof-CE

git remote -v again now tells us
pup-noob https://github.com/pup-noob/woof-CE (fetch)
pup-noob https://github.com/pup-noob/woof-CE (push)
woofce https://github.com/puppylinux-woof-CE/woof-CE (fetch)
woofce https://github.com/puppylinux-woof-CE/woof-CE (push)


AND NOW THE BIG MOMENT : Pushing the new branch playground to our remote fork on github.com :
Code:
git push pup-noob playground

Username:
Password:
Total 0 (delta 0), reused 0 (delta 0)
To https://github.com/pup-noob/woof-CE
* [new branch] playground -> playground


GIT btw is Wary-5.5 devx.sfs loaded into current Slacko-5.6.5
# git --version
git version 1.7.5.4


And in the internet browser it shows
new-branch-on-remote.jpg
 Description   
 Filesize   91.48 KB
 Viewed   183 Time(s)

new-branch-on-remote.jpg

Back to top
View user's profile Send private message Visit poster's website 
Display posts from previous:   Sort by:   
Page 1 of 1 [1 Post]  
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » House Training » HOWTO ( Solutions )
Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.0765s ][ Queries: 12 (0.0304s) ][ GZIP on ]