Re: [git-users] Git on 2 computers and syn
On Wednesday, June 1, 2016 at 9:26:44 AM UTC-6, Alain wrote: > > Thx Alex, > > regarding structure of Git repository i would like to understand something. > I've read book and watched videos with several "trends / methods" regard > sync several computers together. > > 1st method is to have several git repository (1 per project) > 2nd method is to have 1 main git repository where all projects are inside > it > > i understand that from maintenance point of view method 2 is easier to > maintain but is it the best solution ? a commit or an update would run on > ALL projects inside this repository, so maybe it's time consuming. > > I think that the "best solution" is subjective. It depends on how you'll use the solution and what you'll place in the repository. On one end of the spectrum is the Linux kernel git repository. It is a single repository with over 15 000 000 lines of source code, including multiple years of multi-branch, fast paced development stored in a single repository. Browsing the history of that repository is easy because you can see the entire history. Cloning that repository is slower because it is large. On the other end of the spectrum are many Java projects that use maven (or gradle) and tend to have many very small repositories, each able to build a part of the solution. They clone very quickly, compile very quickly, but are more difficult to navigate the history, since you may be crossing repository boundaries to see the full history. There are some projects that use git submodules. I've not yet found a case where git submodules were a net positive for me. http://somethingsinistral.net/blog/git-submodules-are-probably-not-the-answer/ expresses well what concerns me about git submodules. My personal preference has been more towards a single repository, with careful effort to keep large binary files out of the repository. I'm sure others will view it differently. Mark Waite > On Wed, Jun 1, 2016 at 5:00 PM, Alexandru Pătrănescu> wrote: > >> Hi, >> >> As BitBucket is high available I suggest to keep it as a main central >> repo. >> >> To have sync-ed copy of it you can have repos in any other places. >> Start them with *git clone --mirror * and update >> them once every minute with *git remote update --prune*. >> >> Alex >> >> >> On Wed, Jun 1, 2016 at 5:51 PM, Alain >> wrote: >> >>> Hi, >>> >>> i use for now BitBucket (from ATlassian) but in order to not depend on >>> internet connection, i would like to be sure both computer (laptop and >>> desktop) always have the same code. >>> >>> As git is a distributed system, i would like to sync not only 1 >>> repository but all repositories at once. >>> >>> Should i install on both computer Gitlab (both computers have Kubuntu >>> 16.04) ? >>> >>> I do not want my repositories to be public or to pay for a Git solution, >>> so i do not use GitHub. >>> Till now i use BitBucket and i use it as Git remote solution, so maybe >>> this is the best solution till now... >>> >>> I'm waiting your answers. >>> >>> thx >>> >>> >>> -- >>> 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+...@googlegroups.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+...@googlegroups.com . >> For more options, visit https://groups.google.com/d/optout. >> > > > > -- > Alain > --- > Windows 7 x64 / Fedora 20 x64 > MySQL 5.6.x > Apache 2.4.7 / OpenSSL 1.0.1c > Tomcat 7.17 > PHP 5.5 > -- 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. For more options, visit https://groups.google.com/d/optout.
Re: [git-users] How GIT stores data
Sharan Basappawrites: > Is there a way to retrieve the previous version of the file (that is, F.1). It looks like "git fsck --unreachable" would output the hash of such a file. Then you can use "git cat-file" to get the contents of each object. You'll have to inspect the contents manually; as far as I know there's no record kept of where the file contents used to sit in the directory tree. Dale -- 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. For more options, visit https://groups.google.com/d/optout.
Re: [git-users] pushing referenced librarys
Konstantin Khomoutovwrites: > If you're pushing your project directly from Eclipse (I mean, by > clicking some button or activating an entry of some pop-up menu) then > you are not using Git but rather EGit -- an Eclipse's library to work > with Git repositories which itself uses JGit -- a from-scratch > implementation mimicking Git. All this stuff does not use "stock" Git > at all and does not even require it to be installed in the system. > To being with, this is a useful thing to understand. There's an EGit mailing list, egit-dev. https://dev.eclipse.org/mailman/listinfo/egit-dev Dale -- 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. For more options, visit https://groups.google.com/d/optout.
Re: [git-users] recover added file
- Original Message - From: Sharan Basappa To: Git for human beings Sent: Tuesday, May 31, 2016 4:13 PM Subject: [git-users] recover added file Folks, As I make changes to my files, I have been adding them to git repo but haven't been committing them. Today, due to an incorrect switch to the tool, I ended up overwriting a file I was working on. This file was added in repo today. Is there a way to recover that file? Yes, but it requires a little effort on the users part. Git will not delete any of its stoired objects until either commanded, or it has become un-referenced for a reasonable amout of time (configurable) and the garbage collection (gc) has kicked in. Have a search for "git lots and found loose blob" for pertenant hits. Most will deal with lost commits, but all types of objects can be found. There is a Stack Overflow question oin this very issue $SO/q/1108853/717355. -- Philip -- 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. For more options, visit https://groups.google.com/d/optout.
Re: [git-users] git status
On Wed, 1 Jun 2016 08:30:55 -0700 (PDT) Sharan Basappawrote: > I need some help on git status. > > When I do git status in my project directory, I see 3 categories as > follows: > > 1) Changes to be committed: > 2) Changed but not updated: > 3) Untracked files: > > Under "Changes to be committed" - I see files marked as modified & > new file > > I assume that new file here means that an added file isn't in the > repository. > I assume that modified here means that a file that is in the > repository has been modified and also added > > Under "Changed but not updated" - I see files marked as modified > > I assume that modified here means that file has changed but not added > to the repository. > > Are my assumptions in blue font correct? Please note that not all subscribers read this mailing list using the Google Groups web interface. I, for one, read it using a conventional mail reader. So I (luckily) see no colors on your text, and no other formatting. Please take this fact into account next time and try to formulate your question by using plain English words ;-) > There are files that are listed both under "Changes to be > committed" (as new file) & "Changed but not updated" (as modified > file). For a moment if we ignore untracked files, how do I make sure > that I have added appropriate files before committing? > > Also, what does git do if I add a file second time without modifying > it? Well, IMO this is best explained not by asking your questions directly but rather explaining the reasons `git status` shows you your stuff the way it does. Fact 1: unless you use a short-cut command such as `git commit -a` or `git commit path/to/file ...`, the new commit is created from the contents of the staging area ("the index"). Fact 2: you add changes you want to go to the next commit into the index by means of running `git add` on a file whose changes you want to add. Now when you run `git add path/to/file`, there are two possible cases: 1. The file by that name is already in the index. 2. There is no file by that name recorded in the index. In the first case the new contents taken from the specified file in your work tree replaces that of the matching entry in the index. In the second case the entry in the index is created. Now recall that the contents of the index "is based" on the specific commit -- that one referred to by the ref known as "HEAD". Basically, when you do `git checkout foo` with the clean state of your work tree Git 1) retargets HEAD to point at "foo"; 2) populates the index with the data from the commit pointed at by HEAD (and hence the tip of the branch "foo"); 3) makes sure the work tree has the same state as the index. So what `git staus` does is comparing the index to HEAD and the work tree to the index. The differences between HEAD and the index are the changes "to be committed"; the difference between the work tree and the index and the changes which are "not staged". That's what those two groups of changes mean. The rest are merely details: the file about to be committed is marked "new" if `git add` created a new entry for it in the index (the entry was not there before and now it's there -- it's new!). If you run `git rm --cached path/to/file` the entry for that file will be deleted from the index, and `git status` will show it as "deleted". When the contents of an entry was merely updated, it's displayed as that. The term "updated" stems from the fact that `git add` operating on an entry already existing in the index _updates_ it, so "changed but not updated" means "changed locally but `git add` wasn't yet run to stage the changes". Git could have `git add` and `git update` but since creating a new entry in the index is just a byproduct of "updating" a non-existing entry, the command is just `git add`. As to running `git add` several times -- it won't do nothing (visible) which is sensible: updating some contents with the same contents means no change since Git tracks contents. Well, Git also tracks an execution bit on file systems which support it (POSIX), so if you'd change that bit on your file and `git add` it it would be listed as changed. -- 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. For more options, visit https://groups.google.com/d/optout.
[git-users] git status
Folks, I need some help on git status. When I do git status in my project directory, I see 3 categories as follows: 1) Changes to be committed: 2) Changed but not updated: 3) Untracked files: Under "Changes to be committed" - I see files marked as modified & new file I assume that new file here means that an added file isn't in the repository. I assume that modified here means that a file that is in the repository has been modified and also added Under "Changed but not updated" - I see files marked as modified I assume that modified here means that file has changed but not added to the repository. Are my assumptions in blue font correct? There are files that are listed both under "Changes to be committed" (as new file) & "Changed but not updated" (as modified file). For a moment if we ignore untracked files, how do I make sure that I have added appropriate files before committing? Also, what does git do if I add a file second time without modifying it? -- 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. For more options, visit https://groups.google.com/d/optout.
Re: [git-users] Git on 2 computers and syn
Thx Alex, regarding structure of Git repository i would like to understand something. I've read book and watched videos with several "trends / methods" regard sync several computers together. 1st method is to have several git repository (1 per project) 2nd method is to have 1 main git repository where all projects are inside it i understand that from maintenance point of view method 2 is easier to maintain but is it the best solution ? a commit or an update would run on ALL projects inside this repository, so maybe it's time consuming. On Wed, Jun 1, 2016 at 5:00 PM, Alexandru Pătrănescuwrote: > Hi, > > As BitBucket is high available I suggest to keep it as a main central > repo. > > To have sync-ed copy of it you can have repos in any other places. > Start them with *git clone --mirror * and update them > once every minute with *git remote update --prune*. > > Alex > > > On Wed, Jun 1, 2016 at 5:51 PM, Alain wrote: > >> Hi, >> >> i use for now BitBucket (from ATlassian) but in order to not depend on >> internet connection, i would like to be sure both computer (laptop and >> desktop) always have the same code. >> >> As git is a distributed system, i would like to sync not only 1 >> repository but all repositories at once. >> >> Should i install on both computer Gitlab (both computers have Kubuntu >> 16.04) ? >> >> I do not want my repositories to be public or to pay for a Git solution, >> so i do not use GitHub. >> Till now i use BitBucket and i use it as Git remote solution, so maybe >> this is the best solution till now... >> >> I'm waiting your answers. >> >> thx >> >> >> -- >> 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. >> 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. > For more options, visit https://groups.google.com/d/optout. > -- Alain --- Windows 7 x64 / Fedora 20 x64 MySQL 5.6.x Apache 2.4.7 / OpenSSL 1.0.1c Tomcat 7.17 PHP 5.5 -- 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. For more options, visit https://groups.google.com/d/optout.
Re: [git-users] Detect which ignore file (and line) that is preventing file from being added.
Fabian Jonssonwrites: > I had a problem recently trying to add .dll files to git. No suggestion I > found on SO seemed to help. When trying to add each file manually in the > Git bash, I received a message saying that one of my ignore files prevented > the file from being added. I would've liked to see which one of the ignore > files contained that rule, as I later found it hidden in a global ignore > file (probably created by my Git client) that I was not aware of. There is a "git check-ignore" that can probably be used to solve this problem. Dale -- 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. For more options, visit https://groups.google.com/d/optout.
Re: [git-users] Git on 2 computers and syn
Hi, As BitBucket is high available I suggest to keep it as a main central repo. To have sync-ed copy of it you can have repos in any other places. Start them with *git clone --mirror * and update them once every minute with *git remote update --prune*. Alex On Wed, Jun 1, 2016 at 5:51 PM, Alainwrote: > Hi, > > i use for now BitBucket (from ATlassian) but in order to not depend on > internet connection, i would like to be sure both computer (laptop and > desktop) always have the same code. > > As git is a distributed system, i would like to sync not only 1 repository > but all repositories at once. > > Should i install on both computer Gitlab (both computers have Kubuntu > 16.04) ? > > I do not want my repositories to be public or to pay for a Git solution, > so i do not use GitHub. > Till now i use BitBucket and i use it as Git remote solution, so maybe > this is the best solution till now... > > I'm waiting your answers. > > thx > > > -- > 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. > 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. For more options, visit https://groups.google.com/d/optout.
[git-users] Git on 2 computers and syn
Hi, i use for now BitBucket (from ATlassian) but in order to not depend on internet connection, i would like to be sure both computer (laptop and desktop) always have the same code. As git is a distributed system, i would like to sync not only 1 repository but all repositories at once. Should i install on both computer Gitlab (both computers have Kubuntu 16.04) ? I do not want my repositories to be public or to pay for a Git solution, so i do not use GitHub. Till now i use BitBucket and i use it as Git remote solution, so maybe this is the best solution till now... I'm waiting your answers. thx -- 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. For more options, visit https://groups.google.com/d/optout.
[git-users] Re: Patch versions when mailing
Found the solution, there is an argument -v. So use - v2 for v2! On Wednesday, June 1, 2016 at 12:49:05 PM UTC+1, Tony Makkiel wrote: > > Hi All, > I am trying to familiarise myself with "git format-patch". I > noticed people creating different versions of a patch, which looks better. > For eg :- http://comments.gmane.org/gmane.linux.kernel/2231114 > > In the above link it says patch version 7, v7. How is that done? > Normally when I create a patch get a file with number 0001. Is it just a > matter of updating the number (to say 0002 for v2)? > Or is it added manually, by editing the resultant patch file? > > Many Thanks, > Tony > -- 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. For more options, visit https://groups.google.com/d/optout.
[git-users] Detect which ignore file (and line) that is preventing file from being added.
I had a problem recently trying to add .dll files to git. No suggestion I found on SO seemed to help. When trying to add each file manually in the Git bash, I received a message saying that one of my ignore files prevented the file from being added. I would've liked to see which one of the ignore files contained that rule, as I later found it hidden in a global ignore file (probably created by my Git client) that I was not aware of. -- 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. For more options, visit https://groups.google.com/d/optout.
[git-users] Patch versions when mailing
Hi All, I am trying to familiarise myself with "git format-patch". I noticed people creating different versions of a patch, which looks better. For eg :- http://comments.gmane.org/gmane.linux.kernel/2231114 In the above link it says patch version 7, v7. How is that done? Normally when I create a patch get a file with number 0001. Is it just a matter of updating the number (to say 0002 for v2)? Or is it added manually, by editing the resultant patch file? Many Thanks, Tony -- 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. For more options, visit https://groups.google.com/d/optout.