Re: [git-users] Retrieve all files of a group of projects as they were at a given date

2019-05-26 Thread Philip Oakley

Hi Michael, Just back from a vacation.

On 24/05/2019 19:51, Michael wrote:

On 2019-05-16, at 11:35 AM, Giorgio Forti  wrote:


If I commit ONE file Git builds a "zip" that contains the actual situation of 
ALL the 6 thousand of files in my C# solution?
And if I check out this commithe file Git gives me back the complete situation 
at that moment?
This would be the solution.
This can work with files committed only locally and not pushed to the remote 
repository?

So let me explain, if I can, the cheat that git uses.

Git's internal backing store is a write-once file system. Once a file goes into the 
"filesystem", it never changes. Since it never changes, the true internal name 
is the hash of the file.

True (A) (these are Git's 'Blob' objects).


Elsewhere, there are maps of user-visible-filenames to hash-filenames. And 
those maps are also files inside git's file system, and they have a 
hash-filename.

True (B) (These are Git's 'Tree' objects).

Subtlety: At (A), the hash is that of just the _content_, and excludes 
the file name, date, and other meta data. This de-duplicates renames of 
content!
Subtlety: At (B), this is where the _filenames_ (and directory names up 
the trees) are membered and associated with blob hashes.


Please re-read those two bits twice more.

Alright, so what git does is this:
1. At any given moment, the "index" or "cache" contains the state of "what will be 
checked in next" -- and it consists of a full set of filename to hashname maps for the entire project.
2. On any given commit, the vast majority of files will not change, so the 
actual commit will have the same filename to hashname map as the last commit.
3. The actual commit is NOT the set of files, but the set of filename to 
hashname maps.
Yes. (C) (This is the Git 'Commit' object, it just knows its parent(s), 
and its top level tree).


Please re-read number 3 there.

Git will store lots and lots of junk files over time.
'Junk' - the intermediate work-in-progress stuff (especially from 
git-gui), yes.

  There is a separate mechanism that goes  through and finds all hash-filename 
files that are not referenced from any of the commit lists of user-filename to 
hash-filename maps, and cleans those out.

Yes.


Git does not build a zip of all the 6000 files in your commit.
It builds a "zip" of the mappings of user-filenames to hash-filenames.
"yes" - see (C) above - that "zip" is just a 40-char has to the top tree 
(which then does the 'zip cascade...)


And, since this is a tree structure, ** if a directory does not change, it is 
reusing the same directory user filename to git-hash-filename map **.

Absolutely!


The result is that when you change one file, all that changes is the directory 
object for the directory containing the filename of that object (because the 
user-filename now points to a different hash-filename), and all the parent 
directories back up to the root.

This is what makes git fast.

yep


When you say "git add filename", the new file has been added to git's 
write-once backing store. And, the filename to hashname map in the index/cache has been 
updated.

That's one copy, one hash calculation, and one updating of a 40 byte hash 
record in a file. Plus possibly updating hash calculations and data for each 
parent directory.

After that, it's just a case of recording which new hash number is in use in 
various places.

Yep.


This is git's cheat. It's just relying on unchanging hashes that have been 
mostly calculated in the past and are cheap to copy from A to B.
It's more that as simple "just". It's a stonking great benefit from the 
verifiable certainty of the strong hash. Even with the recent sha1 
'breakage', Git has some extra robustness features that mean it isn't 
broken yet (while pdf's are). If you know the hash, and have a copy repo 
containing it, you definitely have the right content, history and 
everything.


The above descriptions relate to the "loose" object viewpoint. Git then 
goes one better, by being able to create a 'pack' file that compresses 
all those loose objects into one efficiently accessed view of the data, 
mainly aided by "Linus's Law" (files grow, older files are smaller). 
Pack files are something for the weekend.

I definitely recommend to learn about "git rebase -i" because you probably will 
need it in near future. Git cherry-pick may help, too, if you are not ready to learn 
about rebasing.

If you are looking to have to do a big, massive merge, which it sounds like ...

You will want to look into a tool called "imerge".  Git-imerge is a program that tries to 
solve the "massive merge" problem. It breaks the merge down into many, many, many little 
merges, most of which are automatic, and a tiny few will need your help with.
Yes. While I haven't used imerge, it is well thought of and does much of 
the early hard work.


It makes the giant merge much less painful. Not pain-free. Less painful.

iMerge operates in two passes. Pass one does the merge, and 

Re: [git-users] Retrieve all files of a group of projects as they were at a given date

2019-05-24 Thread Michael


On 2019-05-16, at 11:35 AM, Giorgio Forti  wrote:

> If I commit ONE file Git builds a "zip" that contains the actual situation of 
> ALL the 6 thousand of files in my C# solution? 
> And if I check out this commithe file Git gives me back the complete 
> situation at that moment?
> This would be the solution.
> This can work with files committed only locally and not pushed to the remote 
> repository?

So let me explain, if I can, the cheat that git uses.

Git's internal backing store is a write-once file system. Once a file goes into 
the "filesystem", it never changes. Since it never changes, the true internal 
name is the hash of the file.

Elsewhere, there are maps of user-visible-filenames to hash-filenames. And 
those maps are also files inside git's file system, and they have a 
hash-filename.

Please re-read those two bits twice more.

Alright, so what git does is this:
1. At any given moment, the "index" or "cache" contains the state of "what will 
be checked in next" -- and it consists of a full set of filename to hashname 
maps for the entire project.
2. On any given commit, the vast majority of files will not change, so the 
actual commit will have the same filename to hashname map as the last commit.
3. The actual commit is NOT the set of files, but the set of filename to 
hashname maps.

Please re-read number 3 there.

Git will store lots and lots of junk files over time. There is a separate 
mechanism that goes  through and finds all hash-filename files that are not 
referenced from any of the commit lists of user-filename to hash-filename maps, 
and cleans those out.

Git does not build a zip of all the 6000 files in your commit.
It builds a "zip" of the mappings of user-filenames to hash-filenames.

And, since this is a tree structure, ** if a directory does not change, it is 
reusing the same directory user filename to git-hash-filename map **.

The result is that when you change one file, all that changes is the directory 
object for the directory containing the filename of that object (because the 
user-filename now points to a different hash-filename), and all the parent 
directories back up to the root.

This is what makes git fast.

When you say "git add filename", the new file has been added to git's 
write-once backing store. And, the filename to hashname map in the index/cache 
has been updated.

That's one copy, one hash calculation, and one updating of a 40 byte hash 
record in a file. Plus possibly updating hash calculations and data for each 
parent directory.

After that, it's just a case of recording which new hash number is in use in 
various places.

This is git's cheat. It's just relying on unchanging hashes that have been 
mostly calculated in the past and are cheap to copy from A to B.

> I definitely recommend to learn about "git rebase -i" because you probably 
> will need it in near future. Git cherry-pick may help, too, if you are not 
> ready to learn about rebasing.

If you are looking to have to do a big, massive merge, which it sounds like ...

You will want to look into a tool called "imerge".  Git-imerge is a program 
that tries to solve the "massive merge" problem. It breaks the merge down into 
many, many, many little merges, most of which are automatic, and a tiny few 
will need your help with.

It makes the giant merge much less painful. Not pain-free. Less painful.

iMerge operates in two passes. Pass one does the merge, and absolutely clutters 
the history.
Pass 2 cleans up the history, and gives you a choice of either "This looks like 
a normal rebase", "This looks like a normal merge", or "This looks like a 
rebase, but keeps the history of how the changes were made". This last option 
*should* be the best choice, but at the moment it isn't. It leaves you with two 
sets of "history links" -- one set important, one set unimportant -- and there 
is no way to indicate to git which is which, and no tools to say "don't show 
these links by default". The result is that your history will look very messy, 
because the existing tools make assumptions that this system breaks.

---
This message was composed with the aid of a laptop cat, and no mouse

-- 
You received this message because you are subscribed to the Google Groups "Git 
for human beings" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to git-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/git-users/079FDC79-DB83-408A-960B-0D1C9B4AF87A%40gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [git-users] Retrieve all files of a group of projects as they were at a given date

2019-05-18 Thread Philip Oakley

Hi Giorgi,

Yes, when you commit, you will commit ALL your tracked files, not just 
the one you changed and 'add'ed.


However, Git being smart, it is actually recording a tree of links to 
the file content in the object store, so it de-duplicates all the 
repetitions.


Plus most of the preparatory work is done when when you 'git add' (it 
adds to the one file to the object store, and updates the tree linkages 
in the "Index"). So all it has to do at the commit stage is record the 
author, committer, date(s), the latest tree ref and the commit message 
(and update the branch tip reference pointer). Everything else is 
already in the object store.


In fact, the 'tree' is a heirachy of single level trees (just like a 
'dir command list;-), each of which is in the object store, and all 
objects are known by their sha1/oid name. At the lowest level it's all 
rather simple and dumb (see the git(1) man page ;-), which is why it 
works so well.


The files locally, and the files on the remote are stored the same way, 
the default unit of transfer is the complete commit, so either can be 
used. I could say more about the RTBs (local branches that track the 
remote's branches..) because they are actually local. All is good.


Philip

On 16/05/2019 19:35, Giorgio Forti wrote:
If I commit ONE file Git builds a "zip" that contains the actual 
situation of ALL the 6 thousand of files in my C# solution?
And if I check out this commithe file Git gives me back the complete 
situation at that moment?

This would be the solution.
This can work with files committed only locally and not pushed to the 
remote repository?


I have only ONE set of files, the main branch, and I am the ONLY 
developer ... but I inherited this project from a team.


Il giorno mercoledì 15 maggio 2019 17:54:41 UTC+2, Philip Oakley ha 
scritto:


"little commits, sometimes a single file, " - Misunderstanding,
misunderstanding, misunderstanding (I think) .

Each commit is always all of the files. A complete 'zip'
(metaphorically, because we don't use zip itself). When you checkout
that commit you get them ALL back, including those that were
changed in
earlier commits.

I know, the various mailing lists and log/show commands always
appear to
only show a diff of just those files that you changed, and omit the
unchanged files, but each commit is still a full snapshot. Those
diffs/patches/show are with respect to the previous commits full
snapshot.

It is only if you were doing different changes on different branches,
and you wish to combine (merge) some of those different snapshots of
those many feature snapshots that you have any extra work (i.e. you
merge those selected commits from those time points).

As I said, changing from centralised to distributed can make your
'head
explode' as all the old expectations crumble to dust...;-)

On 15/05/2019 16:18, Giorgio Forti wrote:
> I used Centralised VCS ... and now I don't have a unique BIG commit
> that is "the moment" i want, I have a lot of little commits,
sometimes
> a single file, and I need to rebuild all the group of applicationa,
> applications, services, DLLs, at "that moment".
> From your answer I understand that this is impossible ... a BIG
problem.
> Used to have this feature, I think this is a big lack.
>
> I'll look at gitk, to see if it can make the search of the file
> versions (one by one...) a little easier.
>
> Il giorno mercoledì 15 maggio 2019 14:39:41 UTC+2, Philip Oakley ha
> scritto:
>
>     Hi Georgio
>
>     On 15/05/2019 12:04, Giorgio Forti wrote:
>     > I'm relatively new to Git.
>     > I use it from inside Visual Studio 2013, for the normal
operations:
>     > commit, push ...
>     > I used and know other similar products but not Git.
>     Similar being e.g. Mercurial (another Distributed version
control
>     system), or a Centralised VCS ? The change to distributed
VCS rips up
>     all the old expectations!
>
>     > I'm searching in Git a feature I used in the past in another
>     product.
>     >
>     > The situation is:
>     > I "inherited" a big Visual Studio 2013 solution under Git
(A LOT of
>     > files in overr 40 different projects).
>     > This project has a remote repository somewhere.
>     > II have full access to files, and to the remote repository.
>     > I have a lot of changes committed locally but still NOT
PUSHED
>     to the
>     > remote repository, and I cannot PUSH these changes now
>     Do you have a personal 'fork' of the repository on a server.
This
>     provides you with a personal 'cloud' storage that ensures
that your
>     local changes - I hope you have lots of commits and
branches- are
>     available in a 'backup' location
>
>     > (sorry 

Re: [git-users] Retrieve all files of a group of projects as they were at a given date

2019-05-16 Thread Giorgio Forti
I see ONE repository for a lot of projects, but after your answer, I'm not 
sure ... how can i see if this is the real situation?


Il giorno mercoledì 15 maggio 2019 17:46:23 UTC+2, Mikko Rantalainen ha 
scritto:
>
>
>
> On Wed, 15 May 2019, 14:04 Giorgio Forti,  > wrote:
>
>> I'm relatively new to Git.
>> I use it from inside Visual Studio 2013, for the normal operations: 
>> commit, push ...
>> I used and know other similar products but not Git.
>> I'm searching in Git a feature I used in the past in another product.
>>
>> The situation is:
>> I "inherited" a big Visual Studio 2013 solution under Git (A LOT of files 
>> in overr 40 different projects).
>>
>
> First, you have to be very sure if you have one repository with multiple 
> projects, or a collection of projects with multiple repositories. The git 
> native style would be to have one repository for each project and one super 
> project that contains references to given revision of each smaller project 
> ("submodule"). Then super project would keep track of each smaller project 
> that makes up the whole big project.
>
> I'm assuming that you really have one big repository with all the code in 
> a single project as far as git knows. (In practice, each project probably 
> has a subdirectory but if you run "git log" you'll get history log of all 
> projects intermingled.
>
> This project has a remote repository somewhere.
>> II have full access to files, and to the remote repository.
>> I have a lot of changes committed locally but still NOT PUSHED to the 
>> remote repository, and I cannot PUSH these changes now
>> (sorry for the terms, I use Git from inside Viasul Studio 2013, I don't 
>> know the Git correct terms)
>> I need to retrieve all files of this solution* AS THEY WERE AT AS GIVEN 
>> DATE* to rebuild that version of the projects and test.
>>
>
> You probably want to see "git log" and figure out the commit that is 
> nearest the timestamp you want. If you have multiple commits made during 
> the given date, you probably don't want to select one of those randomly. 
> Once you know the sha1 of the commit you want, you can simply do "git 
> checkout -b my-special-date ...sha1...".
>
> If I remember correctly, git also supports syntax "git checkout 
> '@2018-12-31 14:45'", if you're feeling lucky.
>
> However, make sure that you don't have any uncommitted changes before 
> doing any checkout or reset.
>
> I definitely recommend to learn about "git rebase -i" because you probably 
> will need it in near future. Git cherry-pick may help, too, if you are not 
> ready to learn about rebasing.
>
> -- 
> Mikko
>
>
>

-- 
You received this message because you are subscribed to the Google Groups "Git 
for human beings" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to git-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/git-users/97a52142-8ea4-4133-95e1-ba0db85d2ece%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [git-users] Retrieve all files of a group of projects as they were at a given date

2019-05-16 Thread Giorgio Forti
If I commit ONE file Git builds a "zip" that contains the actual situation 
of ALL the 6 thousand of files in my C# solution? 
And if I check out this commithe file Git gives me back the complete 
situation at that moment?
This would be the solution.
This can work with files committed only locally and not pushed to the 
remote repository?

I have only ONE set of files, the main branch, and I am the ONLY developer 
... but I inherited this project from a team.

Il giorno mercoledì 15 maggio 2019 17:54:41 UTC+2, Philip Oakley ha scritto:
>
> "little commits, sometimes a single file, " - Misunderstanding, 
> misunderstanding, misunderstanding (I think) . 
>
> Each commit is always all of the files. A complete 'zip' 
> (metaphorically, because we don't use zip itself). When you checkout 
> that commit you get them ALL back, including those that were changed in 
> earlier commits. 
>
> I know, the various mailing lists and log/show commands always appear to 
> only show a diff of just those files that you changed, and omit the 
> unchanged files, but each commit is still a full snapshot. Those 
> diffs/patches/show are with respect to the previous commits full snapshot. 
>
> It is only if you were doing different changes on different branches, 
> and you wish to combine (merge) some of those different snapshots of 
> those many feature snapshots that you have any extra work (i.e. you 
> merge those selected commits from those time points). 
>
> As I said, changing from centralised to distributed can make your 'head 
> explode' as all the old expectations crumble to dust...;-) 
>
> On 15/05/2019 16:18, Giorgio Forti wrote: 
> > I used Centralised VCS ... and now I don't have a unique BIG commit 
> > that is "the moment" i want, I have a lot of little commits, sometimes 
> > a single file, and I need to rebuild all the group of applicationa, 
> > applications, services, DLLs, at "that moment". 
> > From your answer I understand that this is impossible ... a BIG problem. 
> > Used to have this feature, I think this is a big lack. 
> > 
> > I'll look at gitk, to see if it can make the search of the file 
> > versions (one by one...) a little easier. 
> > 
> > Il giorno mercoledì 15 maggio 2019 14:39:41 UTC+2, Philip Oakley ha 
> > scritto: 
> > 
> > Hi Georgio 
> > 
> > On 15/05/2019 12:04, Giorgio Forti wrote: 
> > > I'm relatively new to Git. 
> > > I use it from inside Visual Studio 2013, for the normal 
> operations: 
> > > commit, push ... 
> > > I used and know other similar products but not Git. 
> > Similar being e.g. Mercurial (another Distributed version control 
> > system), or a Centralised VCS ? The change to distributed VCS rips 
> up 
> > all the old expectations! 
> > 
> > > I'm searching in Git a feature I used in the past in another 
> > product. 
> > > 
> > > The situation is: 
> > > I "inherited" a big Visual Studio 2013 solution under Git (A LOT 
> of 
> > > files in overr 40 different projects). 
> > > This project has a remote repository somewhere. 
> > > II have full access to files, and to the remote repository. 
> > > I have a lot of changes committed locally but still NOT PUSHED 
> > to the 
> > > remote repository, and I cannot PUSH these changes now 
> > Do you have a personal 'fork' of the repository on a server. This 
> > provides you with a personal 'cloud' storage that ensures that your 
> > local changes - I hope you have lots of commits and branches- 
> are 
> > available in a 'backup' location 
> > 
> > > (sorry for the terms, I use Git from inside Viasul Studio 2013, I 
> > > don't know the Git correct terms) 
> > > I need to retrieve all files of this solutionAS THEY WERE AT AS 
> > GIVEN 
> > > DATE to rebuild that version of the projects and test. 
> > 
> > This is the 'rip up' - Git doesn't care about file dates - rather it 
> > cares about a group of files all 'zipped' together in one commit. 
> The 
> > date based file view is an XY-problem. What you really want is the 
> > commit that is nearest that date that represents a working version. 
> > > 
> > > How can I do this with Git without looking at the story of every 
> > file 
> > > in the project (a crazy thing to do)? 
> > > The worst of all is I probably will need to "navigate" not only 
> > once, 
> > > but 2-3-more times. 
> > > 
> > > Best of all would be a graphical (human!) interface to do this: by 
> > > command line I sure will do a disaster. 
> > the gitk tool is you friend here (it is part of the basic Git). It 
> > provides a simple viewer and browser for all the commits and files 
> > 
> > > 
> > > Thanks to all 
> > 
> > Philip 
> > see https://gitforwindows.org/ for a personal Git copy. 
> > > 
> > > -- 
> > > You received this message because you are subscribed to the Google 
> > > Groups 

Re: [git-users] Retrieve all files of a group of projects as they were at a given date

2019-05-15 Thread Philip Oakley
"little commits, sometimes a single file, " - Misunderstanding, 
misunderstanding, misunderstanding (I think) .


Each commit is always all of the files. A complete 'zip' 
(metaphorically, because we don't use zip itself). When you checkout 
that commit you get them ALL back, including those that were changed in 
earlier commits.


I know, the various mailing lists and log/show commands always appear to 
only show a diff of just those files that you changed, and omit the 
unchanged files, but each commit is still a full snapshot. Those 
diffs/patches/show are with respect to the previous commits full snapshot.


It is only if you were doing different changes on different branches, 
and you wish to combine (merge) some of those different snapshots of 
those many feature snapshots that you have any extra work (i.e. you 
merge those selected commits from those time points).


As I said, changing from centralised to distributed can make your 'head 
explode' as all the old expectations crumble to dust...;-)


On 15/05/2019 16:18, Giorgio Forti wrote:
I used Centralised VCS ... and now I don't have a unique BIG commit 
that is "the moment" i want, I have a lot of little commits, sometimes 
a single file, and I need to rebuild all the group of applicationa, 
applications, services, DLLs, at "that moment".

From your answer I understand that this is impossible ... a BIG problem.
Used to have this feature, I think this is a big lack.

I'll look at gitk, to see if it can make the search of the file 
versions (one by one...) a little easier.


Il giorno mercoledì 15 maggio 2019 14:39:41 UTC+2, Philip Oakley ha 
scritto:


Hi Georgio

On 15/05/2019 12:04, Giorgio Forti wrote:
> I'm relatively new to Git.
> I use it from inside Visual Studio 2013, for the normal operations:
> commit, push ...
> I used and know other similar products but not Git.
Similar being e.g. Mercurial (another Distributed version control
system), or a Centralised VCS ? The change to distributed VCS rips up
all the old expectations!

> I'm searching in Git a feature I used in the past in another
product.
>
> The situation is:
> I "inherited" a big Visual Studio 2013 solution under Git (A LOT of
> files in overr 40 different projects).
> This project has a remote repository somewhere.
> II have full access to files, and to the remote repository.
> I have a lot of changes committed locally but still NOT PUSHED
to the
> remote repository, and I cannot PUSH these changes now
Do you have a personal 'fork' of the repository on a server. This
provides you with a personal 'cloud' storage that ensures that your
local changes - I hope you have lots of commits and branches- are
available in a 'backup' location

> (sorry for the terms, I use Git from inside Viasul Studio 2013, I
> don't know the Git correct terms)
> I need to retrieve all files of this solutionAS THEY WERE AT AS
GIVEN
> DATE to rebuild that version of the projects and test.

This is the 'rip up' - Git doesn't care about file dates - rather it
cares about a group of files all 'zipped' together in one commit. The
date based file view is an XY-problem. What you really want is the
commit that is nearest that date that represents a working version.
>
> How can I do this with Git without looking at the story of every
file
> in the project (a crazy thing to do)?
> The worst of all is I probably will need to "navigate" not only
once,
> but 2-3-more times.
>
> Best of all would be a graphical (human!) interface to do this: by
> command line I sure will do a disaster.
the gitk tool is you friend here (it is part of the basic Git). It
provides a simple viewer and browser for all the commits and files

>
> Thanks to all

Philip
see https://gitforwindows.org/ for a personal Git copy.
>
> --
> You received this message because you are subscribed to the Google
> Groups "Git for human beings" group.
> To unsubscribe from this group and stop receiving emails from
it, send
> an email to git-...@googlegroups.com 
> .
> To view this discussion on the web visit
>

https://groups.google.com/d/msgid/git-users/e2a1e035-fd14-4783-a2c8-600bbad09fc1%40googlegroups.com



>

>.

> For more options, visit https://groups.google.com/d/optout
.

--
You received this message because you are subscribed to the Google 
Groups "Git for 

Re: [git-users] Retrieve all files of a group of projects as they were at a given date

2019-05-15 Thread Mikko Rantalainen
On Wed, 15 May 2019, 14:04 Giorgio Forti,  wrote:

> I'm relatively new to Git.
> I use it from inside Visual Studio 2013, for the normal operations:
> commit, push ...
> I used and know other similar products but not Git.
> I'm searching in Git a feature I used in the past in another product.
>
> The situation is:
> I "inherited" a big Visual Studio 2013 solution under Git (A LOT of files
> in overr 40 different projects).
>

First, you have to be very sure if you have one repository with multiple
projects, or a collection of projects with multiple repositories. The git
native style would be to have one repository for each project and one super
project that contains references to given revision of each smaller project
("submodule"). Then super project would keep track of each smaller project
that makes up the whole big project.

I'm assuming that you really have one big repository with all the code in a
single project as far as git knows. (In practice, each project probably has
a subdirectory but if you run "git log" you'll get history log of all
projects intermingled.

This project has a remote repository somewhere.
> II have full access to files, and to the remote repository.
> I have a lot of changes committed locally but still NOT PUSHED to the
> remote repository, and I cannot PUSH these changes now
> (sorry for the terms, I use Git from inside Viasul Studio 2013, I don't
> know the Git correct terms)
> I need to retrieve all files of this solution* AS THEY WERE AT AS GIVEN
> DATE* to rebuild that version of the projects and test.
>

You probably want to see "git log" and figure out the commit that is
nearest the timestamp you want. If you have multiple commits made during
the given date, you probably don't want to select one of those randomly.
Once you know the sha1 of the commit you want, you can simply do "git
checkout -b my-special-date ...sha1...".

If I remember correctly, git also supports syntax "git checkout
'@2018-12-31 14:45'", if you're feeling lucky.

However, make sure that you don't have any uncommitted changes before doing
any checkout or reset.

I definitely recommend to learn about "git rebase -i" because you probably
will need it in near future. Git cherry-pick may help, too, if you are not
ready to learn about rebasing.

-- 
Mikko

-- 
You received this message because you are subscribed to the Google Groups "Git 
for human beings" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to git-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/git-users/CAM2wTFYpYhWkkuYdV9pzEB%2Bz6f6uM2o5h5QDGAri0TuqLaXhJg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [git-users] Retrieve all files of a group of projects as they were at a given date

2019-05-15 Thread Giorgio Forti
I used Centralised VCS ... and now I don't have a unique BIG commit that is 
"the moment" i want, I have a lot of little commits, sometimes a single 
file, and I need to rebuild all the group of applicationa, applications, 
services, DLLs, at "that moment".
>From your answer I understand that this is impossible ... a BIG problem.
Used to have this feature, I think this is a big lack.

I'll look at gitk, to see if it can make the search of the file versions 
(one by one...) a little easier.

Il giorno mercoledì 15 maggio 2019 14:39:41 UTC+2, Philip Oakley ha scritto:
>
> Hi Georgio 
>
> On 15/05/2019 12:04, Giorgio Forti wrote: 
> > I'm relatively new to Git. 
> > I use it from inside Visual Studio 2013, for the normal operations: 
> > commit, push ... 
> > I used and know other similar products but not Git. 
> Similar being e.g. Mercurial (another Distributed version control 
> system), or a Centralised VCS ? The change to distributed VCS rips up 
> all the old expectations! 
>
> > I'm searching in Git a feature I used in the past in another product. 
> > 
> > The situation is: 
> > I "inherited" a big Visual Studio 2013 solution under Git (A LOT of 
> > files in overr 40 different projects). 
> > This project has a remote repository somewhere. 
> > II have full access to files, and to the remote repository. 
> > I have a lot of changes committed locally but still NOT PUSHED to the 
> > remote repository, and I cannot PUSH these changes now 
> Do you have a personal 'fork' of the repository on a server. This 
> provides you with a personal 'cloud' storage that ensures that your 
> local changes - I hope you have lots of commits and branches- are 
> available in a 'backup' location 
>
> > (sorry for the terms, I use Git from inside Viasul Studio 2013, I 
> > don't know the Git correct terms) 
> > I need to retrieve all files of this solutionAS THEY WERE AT AS GIVEN 
> > DATE to rebuild that version of the projects and test. 
>
> This is the 'rip up' - Git doesn't care about file dates - rather it 
> cares about a group of files all 'zipped' together in one commit. The 
> date based file view is an XY-problem. What you really want is the 
> commit that is nearest that date that represents a working version. 
> > 
> > How can I do this with Git without looking at the story of every file 
> > in the project (a crazy thing to do)? 
> > The worst of all is I probably will need to "navigate" not only once, 
> > but 2-3-more times. 
> > 
> > Best of all would be a graphical (human!) interface to do this: by 
> > command line I sure will do a disaster. 
> the gitk tool is you friend here (it is part of the basic Git). It 
> provides a simple viewer and browser for all the commits and files 
>
> > 
> > Thanks to all 
>
> Philip 
> see https://gitforwindows.org/ for a personal Git copy. 
> > 
> > -- 
> > You received this message because you are subscribed to the Google 
> > Groups "Git for human beings" group. 
> > To unsubscribe from this group and stop receiving emails from it, send 
> > an email to git-...@googlegroups.com  
> > . 
> > To view this discussion on the web visit 
> > 
> https://groups.google.com/d/msgid/git-users/e2a1e035-fd14-4783-a2c8-600bbad09fc1%40googlegroups.com
>  
> > <
> https://groups.google.com/d/msgid/git-users/e2a1e035-fd14-4783-a2c8-600bbad09fc1%40googlegroups.com?utm_medium=email_source=footer>.
>  
>
> > For more options, visit https://groups.google.com/d/optout. 
>
>

-- 
You received this message because you are subscribed to the Google Groups "Git 
for human beings" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to git-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/git-users/15e66318-b270-4290-b63a-3c79dfee94b6%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [git-users] Retrieve all files of a group of projects as they were at a given date

2019-05-15 Thread Philip Oakley

Hi Georgio

On 15/05/2019 12:04, Giorgio Forti wrote:

I'm relatively new to Git.
I use it from inside Visual Studio 2013, for the normal operations: 
commit, push ...

I used and know other similar products but not Git.
Similar being e.g. Mercurial (another Distributed version control 
system), or a Centralised VCS ? The change to distributed VCS rips up 
all the old expectations!



I'm searching in Git a feature I used in the past in another product.

The situation is:
I "inherited" a big Visual Studio 2013 solution under Git (A LOT of 
files in overr 40 different projects).

This project has a remote repository somewhere.
II have full access to files, and to the remote repository.
I have a lot of changes committed locally but still NOT PUSHED to the 
remote repository, and I cannot PUSH these changes now
Do you have a personal 'fork' of the repository on a server. This 
provides you with a personal 'cloud' storage that ensures that your 
local changes - I hope you have lots of commits and branches- are 
available in a 'backup' location


(sorry for the terms, I use Git from inside Viasul Studio 2013, I 
don't know the Git correct terms)
I need to retrieve all files of this solutionAS THEY WERE AT AS GIVEN 
DATE to rebuild that version of the projects and test.


This is the 'rip up' - Git doesn't care about file dates - rather it 
cares about a group of files all 'zipped' together in one commit. The 
date based file view is an XY-problem. What you really want is the 
commit that is nearest that date that represents a working version.


How can I do this with Git without looking at the story of every file 
in the project (a crazy thing to do)?
The worst of all is I probably will need to "navigate" not only once, 
but 2-3-more times.


Best of all would be a graphical (human!) interface to do this: by 
command line I sure will do a disaster.
the gitk tool is you friend here (it is part of the basic Git). It 
provides a simple viewer and browser for all the commits and files




Thanks to all


Philip
see https://gitforwindows.org/ for a personal Git copy.


--
You received this message because you are subscribed to the Google 
Groups "Git for human beings" group.
To unsubscribe from this group and stop receiving emails from it, send 
an email to git-users+unsubscr...@googlegroups.com 
.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/git-users/e2a1e035-fd14-4783-a2c8-600bbad09fc1%40googlegroups.com 
.

For more options, visit https://groups.google.com/d/optout.


--
You received this message because you are subscribed to the Google Groups "Git for 
human beings" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to git-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/git-users/9909da38-71ab-81d8-4ebe-8cabedb112ad%40iee.org.
For more options, visit https://groups.google.com/d/optout.


[git-users] Retrieve all files of a group of projects as they were at a given date

2019-05-15 Thread Giorgio Forti
I'm relatively new to Git.
I use it from inside Visual Studio 2013, for the normal operations: commit, 
push ...
I used and know other similar products but not Git.
I'm searching in Git a feature I used in the past in another product.

The situation is:
I "inherited" a big Visual Studio 2013 solution under Git (A LOT of files 
in overr 40 different projects).
This project has a remote repository somewhere.
II have full access to files, and to the remote repository.
I have a lot of changes committed locally but still NOT PUSHED to the 
remote repository, and I cannot PUSH these changes now
(sorry for the terms, I use Git from inside Viasul Studio 2013, I don't 
know the Git correct terms)
I need to retrieve all files of this solution* AS THEY WERE AT AS GIVEN 
DATE* to rebuild that version of the projects and test.

How can I do this with Git without looking at the story of every file in 
the project (a crazy thing to do)?
The worst of all is I probably will need to "navigate" not only once, but 
2-3-more times.

Best of all would be a graphical (human!) interface to do this: by command 
line I sure will do a disaster.

Thanks to all

-- 
You received this message because you are subscribed to the Google Groups "Git 
for human beings" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to git-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/git-users/e2a1e035-fd14-4783-a2c8-600bbad09fc1%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.