Re: Simple git question

2020-11-04 Thread Bruce Labitt

Thanks all.  I found that the simple git pull did what I needed it to do.

Built an experimental version of an experimental version...  If anyone 
is interested I'm trying to hunt down a weird DST/ST time bug.  These 
are a bear.  It's really amazing how often people get this wrong.  And 
quite annoying when trying to sync up different machines running 
different software each with entirely different approaches to time shift 
(all of which were actually wrong BTW).  At one point the different 
devices were 2 hours apart, when they should have been within seconds.


Simple manifestation was a failed file read because the time stamp was 
allegedly in the future.  (The time stamp was not in the future!)  Only 
happened once to me and had no tools in place to find it.  Wouldn't you 
know it, error failed to repeat.  If I hadn't saved the debug log, I 
couldn't even prove it happened once.


Not actually thinking I'll trap the error, but if it happens again maybe 
I can learn a little more how to fix it.


Oh and thanks for the list below, very helpful.

On 11/4/20 5:06 PM, Bill Ricker wrote:

Dan's way is as good as any.
(Could also commit to the local branch instead of stashing, which 
would let you diff against your config tweaks.)


I find that understanding what Git is doing really helps me figure out 
what i want to do. My preferred intro for this is


  * Git from the inside out


My other strategic bookmarks -

  * Git - Book 
  * Git - autocomplete

  * Specify an SSH key for git push for a given domain - Stack
Overflow



  * rename git branch locally and remotely · GitHub

  * The Universe of Discourse : How to recover lost files added to Git
but not committed

  * Git 2.5, including multiple worktrees and triangular workflows



  * Difference between git reset soft, mixed and hard


  * git revert-a-faulty-merge



  * 10 Common Git Problems and How to Fix Them – citizen428.blog



[so good i bookmarked it twice, 2nd location Codementor


]
  * git admin: An alias for running git commands as a privileged SSH
identity – Noam Lewis





___
gnhlug-discuss mailing list
gnhlug-discuss@mail.gnhlug.org
http://mail.gnhlug.org/mailman/listinfo/gnhlug-discuss/



___
gnhlug-discuss mailing list
gnhlug-discuss@mail.gnhlug.org
http://mail.gnhlug.org/mailman/listinfo/gnhlug-discuss/


Re: Simple git question

2020-11-04 Thread Bill Ricker
Dan's way is as good as any.
(Could also commit to the local branch instead of stashing, which would let
you diff against your config tweaks.)

I find that understanding what Git is doing really helps me figure out what
i want to do. My preferred intro for this is

   - Git from the inside out
   

My other strategic bookmarks -

   - Git - Book 
   - Git - autocomplete
   
   - Specify an SSH key for git push for a given domain - Stack Overflow
   

   - rename git branch locally and remotely · GitHub
   
   - The Universe of Discourse : How to recover lost files added to Git but
   not committed 
   - Git 2.5, including multiple worktrees and triangular workflows
   

   - Difference between git reset soft, mixed and hard
   
   - git revert-a-faulty-merge
   

   - 10 Common Git Problems and How to Fix Them – citizen428.blog
   

   [so good i bookmarked it twice, 2nd location Codementor
   

   ]
   - git admin: An alias for running git commands as a privileged SSH
   identity – Noam Lewis
   

___
gnhlug-discuss mailing list
gnhlug-discuss@mail.gnhlug.org
http://mail.gnhlug.org/mailman/listinfo/gnhlug-discuss/


Re: Simple git question

2020-11-04 Thread David Berube
If you want to skip the git pull, you can also do this:

git fetch
git reset --hard origin/master

... assuming your origin is called "origin", which is the default, and that
the branch in question is called "master." Note that this will set the
current branch to whatever "master" is on origin, so use git checkout first
if you're not on the right branch.

On Wed, Nov 4, 2020 at 2:35 PM Dan Coutu  wrote:

> Bruce, there’s more than one way to do it. Of course.
>
> If you have not done a git commit of your changes then you can use ‘git
> stash’ to save your changes in the stash.
>
> If you have made commits, and your commits are up to date, then skip doing
> things with the stash.
>
>  If you want to have your changes available for later tinkering then make
> a branch at this point, checkout the branch, and apply your stash to it. So
> assuming you choose to name your branch mysandbox:
>
> git branch mysandbox
> git checkout my sandbox
> git stash apply
>
> Checkout master to get back to the main branch (assuming that it is called
> master):
>
> git checkout master
>
> You can then revert the files to the original clone of the repo like this:
>
> git reset —hard HEAD
>
> Then do a
>
> git pull
>
> To update your repo. That should get you where you want to be.
>
> I hope this helps!
>
> Dan
>
> > On Nov 4, 2020, at 1:43 PM, Bruce Labitt 
> wrote:
> >
> > Guys & Gals, sorry for the elementary question.
> >
> > I have cloned a project that I am interested.  Along the way, I fiddled
> > with setting, mostly debug, but none of my changes are important.  I've
> > built the project and am using it.  I'd like to re download it from the
> > repo again, abandoning any changes that I have made.  A different person
> > has merged some changes and I want to try them.
> >
> > What is the best way to accomplish this?  My head spins with all the
> > pushing and pulling.  For some reason I am loath to nuke everything and
> > start over again.  Is there a slightly more graceful way to do this in
> > git without nuking?
> >
> > github's man area is not illuminating, instead they talk about all sorts
> > of corner case things rather than something this basic.
> >
> > Thanks all.
> >
> > ___
> > gnhlug-discuss mailing list
> > gnhlug-discuss@mail.gnhlug.org
> > http://mail.gnhlug.org/mailman/listinfo/gnhlug-discuss/
>
>
> ___
> gnhlug-discuss mailing list
> gnhlug-discuss@mail.gnhlug.org
> http://mail.gnhlug.org/mailman/listinfo/gnhlug-discuss/
>
-- 
David Berube
Berube Consulting
http://berubeconsulting.com
P.O Box 1746
Concord, NH 03302
United States
Tel: (603) 574-4766
___
gnhlug-discuss mailing list
gnhlug-discuss@mail.gnhlug.org
http://mail.gnhlug.org/mailman/listinfo/gnhlug-discuss/


Re: Simple git question

2020-11-04 Thread Dan Coutu
Bruce, there’s more than one way to do it. Of course. 

If you have not done a git commit of your changes then you can use ‘git stash’ 
to save your changes in the stash.

If you have made commits, and your commits are up to date, then skip doing 
things with the stash.

 If you want to have your changes available for later tinkering then make a 
branch at this point, checkout the branch, and apply your stash to it. So 
assuming you choose to name your branch mysandbox:

git branch mysandbox
git checkout my sandbox
git stash apply

Checkout master to get back to the main branch (assuming that it is called 
master):

git checkout master

You can then revert the files to the original clone of the repo like this:

git reset —hard HEAD

Then do a 

git pull

To update your repo. That should get you where you want to be.

I hope this helps!

Dan

> On Nov 4, 2020, at 1:43 PM, Bruce Labitt  wrote:
> 
> Guys & Gals, sorry for the elementary question.
> 
> I have cloned a project that I am interested.  Along the way, I fiddled 
> with setting, mostly debug, but none of my changes are important.  I've 
> built the project and am using it.  I'd like to re download it from the 
> repo again, abandoning any changes that I have made.  A different person 
> has merged some changes and I want to try them.
> 
> What is the best way to accomplish this?  My head spins with all the 
> pushing and pulling.  For some reason I am loath to nuke everything and 
> start over again.  Is there a slightly more graceful way to do this in 
> git without nuking?
> 
> github's man area is not illuminating, instead they talk about all sorts 
> of corner case things rather than something this basic.
> 
> Thanks all.
> 
> ___
> gnhlug-discuss mailing list
> gnhlug-discuss@mail.gnhlug.org
> http://mail.gnhlug.org/mailman/listinfo/gnhlug-discuss/


___
gnhlug-discuss mailing list
gnhlug-discuss@mail.gnhlug.org
http://mail.gnhlug.org/mailman/listinfo/gnhlug-discuss/


Simple git question

2020-11-04 Thread Bruce Labitt
Guys & Gals, sorry for the elementary question.

I have cloned a project that I am interested.  Along the way, I fiddled 
with setting, mostly debug, but none of my changes are important.  I've 
built the project and am using it.  I'd like to re download it from the 
repo again, abandoning any changes that I have made.  A different person 
has merged some changes and I want to try them.

What is the best way to accomplish this?  My head spins with all the 
pushing and pulling.  For some reason I am loath to nuke everything and 
start over again.  Is there a slightly more graceful way to do this in 
git without nuking?

github's man area is not illuminating, instead they talk about all sorts 
of corner case things rather than something this basic.

Thanks all.

___
gnhlug-discuss mailing list
gnhlug-discuss@mail.gnhlug.org
http://mail.gnhlug.org/mailman/listinfo/gnhlug-discuss/