[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [gits] How does git really change one's directory view?



Thanks all - I git it now :) 

 I later found some documentation that talked about obese branches and how to trim them down, etc (below). While I may never run into these issues, it might become relevant for those dealing with large image files and such. 

Git's object-store appears to be a very elaborate design, indeed. 

https://docs.acquia.com/article/removing-large-files-git-without-losing-history

https://git-scm.com/book/en/v2/Git-Internals-Packfiles

Again, while I may never face bad things (other than of my own doing), there must be some delicate dist. system issues if people are concurrently switching branches and the machine hosting the repo crashes. No?

Cheers,

Ganesh

p.s. I also found (in one tutorial) that accidentally deleted branches are kept around for 30 days; if one knew the sha code, one can get those back. Great!




On Sat, Jul 8, 2017 at 10:39 PM, Eric Eide <eeide@cs.utah.edu> wrote:
Ganesh Gopalakrishnan <ganesh@cs.utah.edu> writes:

> I began reading about "git fsck" to repair broken git repos, and such and
> then gave up, and said ...  "forget it, I'll occasionally copy over my git
> managed repo to Google Drive" :-)

(1)

I agree --- I don't recommend worrying too much about how git's internals are
implemented.  That has never really helped me to use git in practice.

(You *do* need to understand things that are in the git user interface, like
commits and branches and ....  Those things can be complicated enough!)

(2)

Copying a git repository "in toto" to Google Drive is fine, I bet, but I would
definitely recommend copying it back out before working on it.

(Why?  Although I have never tried to use a git repository on Google Drive, but
in general, I would be suspicious of trying to get too fancy with putting
repositories on remote file systems with --- let's say "questionable" ---
semantics about consistency.  In particular, I recall hearing that people
generally had problems when they tried to work with repositories stored in
Dropbox.)

Of course, you can also use push/pull to a remote repository to keep your local
repositories in sync and backed up!  You just need a place to keep your remote
repositories, and I can give you some pointers to resources if you want (e.g.,
to Flux's GitLab server).  Of course, you have to remember to actually *do* the
push before you go home :-)...

Eric.

--
-------------------------------------------------------------------------------
Eric Eide <eeide@cs.utah.edu>  .         University of Utah School of Computing
http://www.cs.utah.edu/~eeide/ . +1 (801) 585-5512 voice, +1 (801) 581-5843 FAX