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 Fri 17 Aug 2018, 19:32
All times are UTC - 4
 Forum index » House Training » HOWTO ( Solutions )
Howto git PART 1
Moderators: Flash, Ian, JohnMurga
Post new topic   Reply to topic View previous topic :: View next topic
Page 2 of 3 [40 Posts]   Goto page: Previous 1, 2, 3 Next
Author Message
gyro

Joined: 28 Oct 2008
Posts: 1542
Location: Brisbane, Australia

PostPosted: Wed 14 Jan 2015, 06:39    Post subject:  

MochiMoppel wrote:
The next problem: Now that I have committed my change, I can't edit the file any longer. I would like to add another change. How can I do this? Uncommit? The pencil icon which let me make the first change is not active anymore... Crying or Very sad
Sorry, don't know, never done editing or commits directly on github.
gyro
Back to top
View user's profile Send private message 
mavrothal


Joined: 24 Aug 2009
Posts: 2971

PostPosted: Wed 14 Jan 2015, 07:28    Post subject:  

MochiMoppel wrote:

The next problem: Now that I have committed my change, I can't edit the file any longer. I would like to add another change. How can I do this? Uncommit? The pencil icon which let me make the first change is not active anymore... Crying or Very sad

You just change the file and make another commit. There is no problem one change to be done in multiple commits. It's actually recommended! A pull requests can have multiple commits. Wink
Alternatively you can revert the commit and start again, but you do not gain anything by this because at the end will be 3 commits. Original, reversion and the new one.
Plan C is to do hard reset (git reset --hard <commit hash>) to a previous commit that will both change the files and the commit log to a previous state. This is actually not recommended because you really lose all the info from that point forward.

_________________
== Here is how to solve your Linux problems fast ==
Back to top
View user's profile Send private message 
MochiMoppel


Joined: 26 Jan 2011
Posts: 1579
Location: Japan

PostPosted: Wed 14 Jan 2015, 08:48    Post subject:  

mavrothal wrote:
You just change the file and make another commit.
But this was exactly my problem: can't do that. It turned out that this is a browser issue. I switched from Opera to Seamonkey, which - surprisingly - gives me a different tooltip for the right pencil icon (Something like: you have to choose a branch first). In Opera it's "make changes to the file" and the branch default can't be changed and is set to a cryptic number. "master" sounds a bit bold, but I hope it's OK.

So a "commit" is what? Just a copy of the original files with my changes?

Quote:
Plan C is to do hard reset (git reset --hard <commit hash>) to a previous commit that will both change the files and the commit log to a previous state.
I wouldn't know how to do this online.
Screenshot.png
Description 
png

 Download 
Filename  Screenshot.png 
Filesize  77.82 KB 
Downloaded  199 Time(s) 
Back to top
View user's profile Send private message 
MochiMoppel


Joined: 26 Jan 2011
Posts: 1579
Location: Japan

PostPosted: Sun 01 Feb 2015, 07:30    Post subject:  

So many unanswered questions, so many wasted hours, so much frustration. I've deleted all of my test projects, I'm on the brink of giving up on github.

OK then, one last try. Step-by-step:

I forked woof-CE to MochiMoppel/woof-CE
From now I operate in the master branch of my forked version.
My goal is to make a change to 1 file, then issue a request to pull this change into the testing branch of the original woof-CE . Is this the correct approach?
Back to top
View user's profile Send private message 
rufwoof

Joined: 24 Feb 2014
Posts: 2431

PostPosted: Sun 01 Feb 2015, 09:27    Post subject:  

MochiMoppel wrote:
So many unanswered questions, so many wasted hours, so much frustration. I've deleted all of my test projects, I'm on the brink of giving up

Fortunately I didn't waste too many hours before losing interest and giving up.
Back to top
View user's profile Send private message 
stemsee

Joined: 27 Jun 2013
Posts: 2260
Location: In The Way

PostPosted: Sun 01 Feb 2015, 10:49    Post subject:  

You should operate in the 'Testing' branch.

Actually I gave up with github, for the present.
Back to top
View user's profile Send private message MSN Messenger 
MochiMoppel


Joined: 26 Jan 2011
Posts: 1579
Location: Japan

PostPosted: Mon 02 Feb 2015, 03:48    Post subject:  

stemsee wrote:
You should operate in the 'Testing' branch.
Fine, but how do I copy the file I'm going to work on from my copy of the master branch to my copy of the testing branch? Fork a single file? Issue a pull request to myself? Or can I assume that all files in the testing branch are the same as in the master branch? Would defeat the purpose of keeping a testing branch...
Back to top
View user's profile Send private message 
stemsee

Joined: 27 Jun 2013
Posts: 2260
Location: In The Way

PostPosted: Mon 02 Feb 2015, 10:48    Post subject:  

Copy the contents of the file. Then move to the same subdir in Testing and create new file then paste into it.
Back to top
View user's profile Send private message MSN Messenger 
MochiMoppel


Joined: 26 Jan 2011
Posts: 1579
Location: Japan

PostPosted: Mon 02 Feb 2015, 21:37    Post subject:  

I would consider this to be the equivalent of shutting down the computer with the power button or eating with your fingers at the Queen's banquet dinner ... you can do it, but shouldn't. I would expect that git provides a better way, which doesn't break the audit trail and which would assist me in cases where I have to copy not just 1, but 100 files.
Back to top
View user's profile Send private message 
gcmartin

Joined: 14 Oct 2005
Posts: 6730
Location: Earth

PostPosted: Tue 03 Feb 2015, 01:43    Post subject:  

This is NOT going to answer any of your questions; BUT it may be a source(s) of getting correct use approaches:
  • http://groups.google.com/forum/#!forum/git-users <=== GIT forum on Google
  • the git sharing community on g+
  • GIT forum
  • git at irc.freenode.net
  • Reading over/searching HackerNews for git related posts.
Hoping this will help

_________________
Get ACTIVE Create Circles; Do those good things which benefit people's needs!
We are all related ... Its time to show that we know this!
3 Different Puppy Search Engines or use DogPile
Back to top
View user's profile Send private message 
mavrothal


Joined: 24 Aug 2009
Posts: 2971

PostPosted: Tue 03 Feb 2015, 02:00    Post subject:  

Unless you want to do limited editing to a file, I would NOT use the browser to do any git work. Github is more of a server for your files than an actual work environment
Git has almost limitless abilities (and thus options...) Only a small fraction of these is available through the web interface of github.

So, fork, clone your fork to your machine, work on your local machine anyway you want (there are git-GUIs for any OS if you need it), commit your changes in your local machine, push to your repo and at that point when you are happy with YOUR git/github state, use the web browser to issue the pull request.
Regarding having a pull request between different branches, is not advised as down the road is likely to mess up the history if/when branches will be merged (there are ways around it too, but is a hassle).

_________________
== Here is how to solve your Linux problems fast ==
Back to top
View user's profile Send private message 
MochiMoppel


Joined: 26 Jan 2011
Posts: 1579
Location: Japan

PostPosted: Tue 03 Feb 2015, 04:02    Post subject:  

mavrothal wrote:
Unless you want to do limited editing to a file
Yes, I want to do limited editing to a file. I clearly described what I did and asked for the next step. Let me worry about the "limitless abilities" later and kindly advise how I can achieve this seemingly trivial task in the browser.
Back to top
View user's profile Send private message 
mavrothal


Joined: 24 Aug 2009
Posts: 2971

PostPosted: Tue 03 Feb 2015, 05:23    Post subject:  

MochiMoppel wrote:
mavrothal wrote:
Unless you want to do limited editing to a file
Yes, I want to do limited editing to a file. I clearly described what I did and asked for the next step. Let me worry about the "limitless abilities" later and kindly advise how I can achieve this seemingly trivial task in the browser.

I have seen several things here. Which one are you referring to?
Copy a file form master to testing? Merge the versions of a file in the two branches(does it exist in both)? Do (whatever it is you want) in the browser mandatorily and not in your local machine? Solve the browser compatibility issues? Other?...
A better question may get you a better answer Wink

In general you can "merge" branches, or "cherry-pick" specific commits.
You probably want to merge master into testing. There are many options that can overcome specific issues in merging. A search with the warning (if any) will likely give you the solution if a problem arrises.

_________________
== Here is how to solve your Linux problems fast ==
Back to top
View user's profile Send private message 
MochiMoppel


Joined: 26 Jan 2011
Posts: 1579
Location: Japan

PostPosted: Tue 03 Feb 2015, 05:37    Post subject:  

mavrothal wrote:
I have seen several things here. Which one are you referring to?

I wrote:
I forked woof-CE to MochiMoppel/woof-CE
From now I operate in the master branch of my forked version.
My goal is to make a change to 1 file, then issue a request to pull this change into the testing branch of the original woof-CE . Is this the correct approach?
Back to top
View user's profile Send private message 
mavrothal


Joined: 24 Aug 2009
Posts: 2971

PostPosted: Tue 03 Feb 2015, 05:40    Post subject:  

MochiMoppel wrote:
mavrothal wrote:
I have seen several things here. Which one are you referring to?

I wrote:
I forked woof-CE to MochiMoppel/woof-CE
From now I operate in the master branch of my forked version.
My goal is to make a change to 1 file, then issue a request to pull this change into the testing branch of the original woof-CE . Is this the correct approach?


Can be done but better work in the same branch you want to issue the pull request at

_________________
== Here is how to solve your Linux problems fast ==
Back to top
View user's profile Send private message 
Display posts from previous:   Sort by:   
Page 2 of 3 [40 Posts]   Goto page: Previous 1, 2, 3 Next
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.0739s ][ Queries: 12 (0.0094s) ][ GZIP on ]