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 Sat 20 Dec 2014, 18:31
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 [10 Posts]  
Author Message
Karl Godt


Joined: 20 Jun 2010
Posts: 3982
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   1288 Time(s)

new-branch-on-remote.jpg

Back to top
View user's profile Send private message Visit poster's website 
scsijon

Joined: 23 May 2007
Posts: 1052
Location: the australian mallee

PostPosted: Sun 29 Jun 2014, 23:26    Post subject: push problem (solved)  

I followed instructions and other than calling it playground1, it all works until we get to :

# git push pup-noob playground1
Username:
Password:
error: The requested URL returned error: 403 while accessing https://github.com/pup-noob/woof-CE/info/refs

fatal: HTTP request failed

errored as above

any ideas?

EDIT: Forget it, i've just realized that your username is pup-noob and I should have used my own login name here. Maybe it's worth highlighting that bit in case others also get confused.
Back to top
View user's profile Send private message Visit poster's website 
slavvo67

Joined: 12 Oct 2012
Posts: 495
Location: The other Mr. 305

PostPosted: Fri 18 Jul 2014, 19:32    Post subject:  

Is there any more to this? How do you create a Puppy from here?
Back to top
View user's profile Send private message 
scsijon

Joined: 23 May 2007
Posts: 1052
Location: the australian mallee

PostPosted: Fri 25 Jul 2014, 22:36    Post subject:  

slavvo67 wrote:
Is there any more to this? How do you create a Puppy from here?


goto the directory structure you have just built on your local workstation and you will see it's in a woof format. From here you just follow the standard building instructions.

ie open a terminal, goto the directory you created, type ./merge2out and off you go...

_________________
Puppy T290 - BarryK's Racy but with T2 Version 9.0 is under development.
http://www.murga-linux.com/puppy/viewtopic.php?t=94575
Back to top
View user's profile Send private message Visit poster's website 
peterw

Joined: 19 Jul 2006
Posts: 78
Location: UK

PostPosted: Mon 28 Jul 2014, 17:36    Post subject: Final touches to get git working
Subject description: Clarification of instructions
 

Hi
I am trying to get git working and fail at the final stage. The instructions are very good up to this point. Any clarification on this last bit will be useful. When I type:

git push pup-noob playtime

(I used playtime and not playground)

I get the same result as scsijon which I have copied below; however he found a way around it. I have tried various combinations of my user name instead of pup-noob but cannot get past this last hurdle.

Username:
Password:
error: The requested URL returned error: 403 while accessing https://github.com/pup-noob/woof-CE/info/refs

fatal: HTTP request failed

errored as above

any ideas?
Back to top
View user's profile Send private message 
scsijon

Joined: 23 May 2007
Posts: 1052
Location: the australian mallee

PostPosted: Thu 31 Jul 2014, 03:24    Post subject:  

@peterw -

PETER YOU NEED TO USE YOUR OWN git ACCOUNT NAME NOT pup-noob. pup-noob was for explanation ONLY, NOT FOR ACTUAL USE> YOU DO NOT HAVE FULL RIGHTS TO IT, only the origonal creator has.

Set that up first and replace everywhere you see in parts 1 to 3 where it says pup-noob with your own account name and you will be ok.


@Karl, can you please make it clear from part 1 please that they need to do this, i'm also getting pm's about this.

_________________
Puppy T290 - BarryK's Racy but with T2 Version 9.0 is under development.
http://www.murga-linux.com/puppy/viewtopic.php?t=94575
Back to top
View user's profile Send private message Visit poster's website 
peterw

Joined: 19 Jul 2006
Posts: 78
Location: UK

PostPosted: Fri 01 Aug 2014, 04:02    Post subject: Final touches to get git working
Subject description: Following Karl Godt's Instructions
 

Hi scsijon

Thanks for the response. I think I have followed the instructions correctly. However, I still can't get over the final hurdle. I have attached a copy of what I see in the terminal. You can see that I tried various combinations. I must be doing something stupid. I know I can sign in to github.com with my user name and password on another computer so it can't be that. I am running out of ideas.

peterw
Screenshot_2014-08-01_084745.png
Description  Copy of screen showing 403 error and previous commands.
png

 Download 
Filename  Screenshot_2014-08-01_084745.png 
Filesize  180.1 KB 
Downloaded  58 Time(s) 
Back to top
View user's profile Send private message 
scsijon

Joined: 23 May 2007
Posts: 1052
Location: the australian mallee

PostPosted: Fri 01 Aug 2014, 23:17    Post subject: Re: Final touches to get git working
Subject description: Following Karl Godt's Instructions
 

peterw wrote:
Hi scsijon

Thanks for the response. I think I have followed the instructions correctly. However, I still can't get over the final hurdle. I have attached a copy of what I see in the terminal. You can see that I tried various combinations. I must be doing something stupid. I know I can sign in to github.com with my user name and password on another computer so it can't be that. I am running out of ideas.

peterw


I had that too on the first go when i created my local git woof-CE copy when I was trying to use pup-noob! I thought that was just me as I already had git access for other projects.

I ended up by blowing my local copy away and starting all over again back with git part1 using my own name in the right places and that fixed it all.

I'm sure there is a fix for this but I couldn't work it out, it seems to link your local git copy of woof-CE with the git username pup-noob, not your online git username and this is the problem. Maybe karl or one of the git people can help.

_________________
Puppy T290 - BarryK's Racy but with T2 Version 9.0 is under development.
http://www.murga-linux.com/puppy/viewtopic.php?t=94575
Back to top
View user's profile Send private message Visit poster's website 
peterw

Joined: 19 Jul 2006
Posts: 78
Location: UK

PostPosted: Sun 03 Aug 2014, 04:22    Post subject: setting up git
Subject description: overcoming difficulty
 

Hi scsijon

Thanks for the help. Deleting the puppylinux-woof-CE.d directory, using my own git name instead of pupnoob and starting again did the trick.
Another tip for anyone following this procedure is, "how to exit the git log screen". This produces long list of changes. Just type "q" and it quits allowing you to go on with the task.

peterw
Back to top
View user's profile Send private message 
technosaurus


Joined: 18 May 2008
Posts: 4424

PostPosted: Mon 18 Aug 2014, 06:49    Post subject:  

Here is a trick that should be in every git toolbox:

Code:
git clone --depth 1 <repository>
#or more detailed version
git clone --depth 1 --branch <branchname> git://github.com/<user>/<project>.git


clone a repository in its current state only (no history) useful if you want to make a patch, but don't want 2gb of history (linux repo for instance)

_________________
Web Programming - Pet Packaging 100 & 101
Back to top
View user's profile Send private message 
Display posts from previous:   Sort by:   
Page 1 of 1 [10 Posts]  
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.0908s ][ Queries: 12 (0.0041s) ][ GZIP on ]