Re: [git-users] keeping #comments inside the commit message
On 08/05/2013 16:57, Konstantin Khomoutov wrote: In which use cases there are comment lines mixed with the commit message? I, for one, do not know. I can make a wild guess: in certain situations a commit message might end up being composed out of several templates, each inserting its own comments. This is a pure speculation, though. The default commit message you're presented with when you use `git rebase -i` to squash two commits together uses this format: first commit message, comment, second commit message, comment. Not removing the comment lines on commit here would leave an ugly message. Antony -- 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/groups/opt_out.
[git-users] Re: "Trying to write ref refs/heads/master with nonexistant object" even though the object exists
This is now been resolved. The problem was an abilguous ref, as described by the commit which fixed it (back in 1.7.8.2): 1e7ba0f9: fetch-pack: match refs exactly (see [1] for github). Antony [1]: https://github.com/git/git/commit/1e7ba0f9 -- You received this message because you are subscribed to the Google Groups "Git for human beings" group. To view this discussion on the web visit https://groups.google.com/d/msg/git-users/-/wE3tVVpLUM0J. To post to this group, send email to git-users@googlegroups.com. To unsubscribe from this group, send email to git-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/git-users?hl=en.
[git-users] Re: Include empty folders
On Saturday, 8 September 2012 16:38:22 UTC+1, Mindcast Mindcast wrote: > > Hello, > > is there any way to include empty folders when i git commit without adding > a file (like .gitignore or .gitkeep) ? > > As long as i know there is no official way to do this. > > But, is this something it can be implemented maybe in a future version ? > Interesting thread here: http://thread.gmane.org/gmane.comp.version-control.git/165720/focus=165904 -- You received this message because you are subscribed to the Google Groups "Git for human beings" group. To view this discussion on the web visit https://groups.google.com/d/msg/git-users/-/I6wm3aB2cEEJ. To post to this group, send email to git-users@googlegroups.com. To unsubscribe from this group, send email to git-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/git-users?hl=en.
[git-users] Re: Problems with Git install on Windows 7
On Friday, 7 September 2012 22:22:05 UTC+1, jak wrote: > > I downloaded and installed 1.7.11 from http://git-scm.com/download/win last > week. (actually I've done it twice). > > I'm having several problems that seems like my install is missing > something. > > 1) missing man executable. When I type git help add for instance, I get: > >$ git help add >warning: failed to exec 'man': No such file or directory >fatal: no man viewer handled the request > > > when I look in the bin directory, no man command. > > > 2) to work around this, I did git config --global help.format web and set > my help.browser too, but I get the same > error as above when I do git help, Here is my config output: > > $ git config help.format > web > > > However, if I do git help -w add, the help page comes up in my browser > as expected. > How come my default setting is not working? > This is a problem in the first release of the 1.7.11 installer for msysgit. This was fixed in the next release [1], but git-scm.com linked to the first release for a while. I emailed the website's maintainer, and the link is now correct, but looks like you downloaded msysgit when it wasn't... > > 3) (worst problem) - I cannot get pull to work from my repository on > github (I am able to push). When I do >"git pull", I get a popup window: > git.exe- System Error. > > The program can't start because libiconv-2.dll is missing from your > computer. > Try reinstalling the program to fix this problem. > > but when I go to Git's bin directory the dll is there: > $ ls -l libi* > -rwxr-xr-x1 jak Administ 1241889 Sep 2 17:02 libiconv-2.dll > -rwxr-xr-x1 jak Administ 978432 Sep 2 17:02 libiconv2.dll > > Pretty frustrating. Any help would be greatly appreciated > jim > That's a new one on me. I installed the faulty version while trying to help someone debug the man problem, and didn't hit that. Try installing the latest release of msysgit, and if that doesn't help here, try [2]. Antony [1]: http://code.google.com/p/msysgit/downloads/detail?name=Git-1.7.11-preview20120704.exe [2]: http://stackoverflow.com/questions/3431361/git-for-windows-the-program-cant-start-because-libiconv2-dll-is-missing -- You received this message because you are subscribed to the Google Groups "Git for human beings" group. To view this discussion on the web visit https://groups.google.com/d/msg/git-users/-/L5oHW3vrN00J. To post to this group, send email to git-users@googlegroups.com. To unsubscribe from this group, send email to git-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/git-users?hl=en.
Re: [git-users] git checkout " silently fails
On 04/09/2012 18:21, Senthil wrote: This may be an edge case which has been discussed, but I did not find any topics relating to this. If file 1 exists on branch B but not on branch A, I am seeing this behavior: git checkout A git checkout A -- 1 error: pathspec '1' did not match any file(s) known to git. git checkout B git checkout A -- 1 No complaints after running the last line the second time around. The file exists in the directory tree, and it is the version that exists in branch B. How come the second time, git does not throw an error message and just silently does nothing? I'm using GIT version 1.7.4.1 Thanks, -Senthil Just tested this in v1.7.11, and it behaves as expected (errors out both times). Whatever the problem was (and I agree, it's unexpected behaviour), it's been fixed. -- You received this message because you are subscribed to the Google Groups "Git for human beings" group. To post to this group, send email to git-users@googlegroups.com. To unsubscribe from this group, send email to git-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/git-users?hl=en.
[git-users] Re: restore theirs and ours after rebase
On Thursday, 6 September 2012 08:14:47 UTC+1, Evert Tigchelaar wrote: > > Hi, > > A little while ago I had some problems with git and a colleague with more > git > experience helped me and performed a git rebase and now "theirs" and > "ours" are reversed. > I read (in the documentation) this is normal but is there a way to reverse > "theirs" and "ours" again? > I ask this because its confusing when resolving a merge conflict. > In the past I could use: > git checkout --theirs > to checkout theirs version but now I have to do: > git checkout --ours > to checkout theirs version. > I'm pretty sure there isn't a way to reverse this. There was some discussion on the mailing list a long time back, but I don't recall it going anywhere. It may help, however, to understand *why* things are the way they are. When you `git checkout master; git merge branch`, you sit on the master branch, then apply changes from the develop branch. Therefore master is 'ours', and branch is 'theirs'. However, when you `git checkout master; git rebase branch` (this is the slightly unusual situation of rebase master *onto* branch, but I'm doing it to keep the examples consistent), git actually checks out branch, then applies patches from master. So, branch is 'ours' and master is 'theirs'. -- You received this message because you are subscribed to the Google Groups "Git for human beings" group. To view this discussion on the web visit https://groups.google.com/d/msg/git-users/-/3HDmNMZtRu8J. To post to this group, send email to git-users@googlegroups.com. To unsubscribe from this group, send email to git-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/git-users?hl=en.
Re: [git-users] Re: Why git merge always ask for a commit message?
On Wednesday, 5 September 2012 07:21:14 UTC+1, Mauro Sanna wrote: > > On 5 September 2012 00:49, Antony Male > > wrote: > > On Tuesday, 4 September 2012 21:42:29 UTC+1, Mauro Sanna wrote: > >> > >> On 4 September 2012 14:44, Antony Male wrote: > >> > On Monday, 3 September 2012 21:53:28 UTC+1, Mauro Sanna wrote: > >> >> > >> >> On 3 September 2012 19:45, Antony Male wrote: > >> >> > On Monday, 3 September 2012 18:33:03 UTC+1, Mauro Sanna wrote: > >> >> >> > >> >> >> On 3 September 2012 18:56, Antony Male > wrote: > >> >> >> > On Monday, 3 September 2012 17:32:46 UTC+1, Mauro Sanna wrote: > >> >> >> >> > >> >> >> >> On 3 September 2012 18:13, Antony Male > >> >> >> >> wrote: > >> >> >> >> > On Monday, 3 September 2012 12:19:11 UTC+1, Mauro Sanna > wrote: > >> >> >> >> >> > >> >> >> >> >> Then I do a git checkout master, git merge devel and push > and > >> >> >> >> >> all > >> >> >> >> >> done. > >> >> >> >> >> I always have done this but now, in a new application, when > I > >> >> >> >> >> do > >> >> >> >> >> git > >> >> >> >> >> merge > >> >> >> >> >> devel into master it asks me for a commit message. > >> >> >> >> > > >> >> >> >> > > >> >> >> >> > In version 1.7.10, git started prompting for a commit > message > >> >> >> >> > after > >> >> >> >> > every > >> >> >> >> > merge. The rationale behind this is explained in Junio's > (the > >> >> >> >> > maintainer's) > >> >> >> >> > blog post [1] > >> >> >> >> > >> >> >> >> Ok but, why it don't ask for a commit message when used in > some > >> >> >> >> other > >> >> >> >> projects? > >> >> >> >> .git/config is the same. > >> >> >> >> Perhaps because I've set the repository using git before > 1.7.10? > >> >> >> > > >> >> >> > > >> >> >> > Maybe in one project the merges you're doing are > non-fast-forward > >> >> >> > (as > >> >> >> > you > >> >> >> > stated), whereas in the others they're fast-forward? Maybe > there's > >> >> >> > a > >> >> >> > configuration difference? (I didn't think there was a config > key > >> >> >> > to > >> >> >> > disable > >> >> >> > this behaviour, but it's worth a check). > >> >> >> > >> >> >> > >> >> >> Here the config for two of my projects. > >> >> >> The first is not fast-forward while in the second the merge is > >> >> >> fast-forward. > >> >> > > >> >> > > >> >> > There we go! Read up on the differences between fast-forward and > >> >> > non-fast-forward merges. [1] is a helpful resource. > >> >> > > >> >> > Now, as you can see, fast-forward merges don't involve an actual > >> >> > merge > >> >> > commit. No merge commit = no commit message. Which is why you're > not > >> >> > being > >> >> > prompted for a message for the fast-forward merge.n > >> >> > >> >> Yes I know, but I want my merges to be fast-forward. > >> >> Because git configuration is the same for the two projects I don't > >> >> know why the merge for first project go fast-forward while the > second > >> >> one not. > >> >> What's the differerence between the two configurations? There is no > >> >> difference, so why I have a merge with fast-forward and a merge with > >> >> no fast-forward? > >> > > >> > > >> >
Re: [git-users] Re: Why git merge always ask for a commit message?
On Tuesday, 4 September 2012 21:42:29 UTC+1, Mauro Sanna wrote: > > On 4 September 2012 14:44, Antony Male > > wrote: > > On Monday, 3 September 2012 21:53:28 UTC+1, Mauro Sanna wrote: > >> > >> On 3 September 2012 19:45, Antony Male wrote: > >> > On Monday, 3 September 2012 18:33:03 UTC+1, Mauro Sanna wrote: > >> >> > >> >> On 3 September 2012 18:56, Antony Male wrote: > >> >> > On Monday, 3 September 2012 17:32:46 UTC+1, Mauro Sanna wrote: > >> >> >> > >> >> >> On 3 September 2012 18:13, Antony Male > wrote: > >> >> >> > On Monday, 3 September 2012 12:19:11 UTC+1, Mauro Sanna wrote: > >> >> >> >> > >> >> >> >> Then I do a git checkout master, git merge devel and push and > all > >> >> >> >> done. > >> >> >> >> I always have done this but now, in a new application, when I > do > >> >> >> >> git > >> >> >> >> merge > >> >> >> >> devel into master it asks me for a commit message. > >> >> >> > > >> >> >> > > >> >> >> > In version 1.7.10, git started prompting for a commit message > >> >> >> > after > >> >> >> > every > >> >> >> > merge. The rationale behind this is explained in Junio's (the > >> >> >> > maintainer's) > >> >> >> > blog post [1] > >> >> >> > >> >> >> Ok but, why it don't ask for a commit message when used in some > >> >> >> other > >> >> >> projects? > >> >> >> .git/config is the same. > >> >> >> Perhaps because I've set the repository using git before 1.7.10? > >> >> > > >> >> > > >> >> > Maybe in one project the merges you're doing are non-fast-forward > (as > >> >> > you > >> >> > stated), whereas in the others they're fast-forward? Maybe there's > a > >> >> > configuration difference? (I didn't think there was a config key > to > >> >> > disable > >> >> > this behaviour, but it's worth a check). > >> >> > >> >> > >> >> Here the config for two of my projects. > >> >> The first is not fast-forward while in the second the merge is > >> >> fast-forward. > >> > > >> > > >> > There we go! Read up on the differences between fast-forward and > >> > non-fast-forward merges. [1] is a helpful resource. > >> > > >> > Now, as you can see, fast-forward merges don't involve an actual > merge > >> > commit. No merge commit = no commit message. Which is why you're not > >> > being > >> > prompted for a message for the fast-forward merge.n > >> > >> Yes I know, but I want my merges to be fast-forward. > >> Because git configuration is the same for the two projects I don't > >> know why the merge for first project go fast-forward while the second > >> one not. > >> What's the differerence between the two configurations? There is no > >> difference, so why I have a merge with fast-forward and a merge with > >> no fast-forward? > > > > > > 'git merge' will (by default) do a fast-forward merge if it can, > otherwise > > it will do a recursive merge. > > > > As shown by the PDF I linked to a few posts back, if you're merging > develop > > into master (git checkout master; git merge develop), a fast-forward > merge > > can happen if and only if develop is a direct descendant of master. That > is, > > if the master branch contains only commits which are also contained by > the > > develop branch. If master has commits which develop does not have, then > a > > fast-forward merge cannot occur, and a recursive merge must be used > instead. > > > > Graphically: (Use a fixed-width font to view: I know google groups uses > a > > variable-width font by default) > > > > A fast-forward merge *can* occur: > > > > O--O--O > >/ ^ > > O--O--Odevelop > > ^ > > master > > > > w
[git-users] Re: rejected - non-fast-forward
On Tuesday, 4 September 2012 20:27:00 UTC+1, Adriano Schmidt wrote: > > Hy, > > I'm using e-git (git plugin in eclipse). > > when I "push" happens this error: > > "rejected - non-fast-forward" > This means that the remote repo has gained new commits which aren't in your local repo. You now can't just push your version of history, as then there'd be two versions of history in the remote repo, which is forbidden. You need to fetch the new history from the remote repo, then either merge together the two versions, or rebase your version on top of the remote version. There's probably a 'pull' button somewhere (I'm unfamiliar with egit) which will achieve this. -- You received this message because you are subscribed to the Google Groups "Git for human beings" group. To view this discussion on the web visit https://groups.google.com/d/msg/git-users/-/TC8T-6m8zTMJ. To post to this group, send email to git-users@googlegroups.com. To unsubscribe from this group, send email to git-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/git-users?hl=en.
Re: [git-users] Re: Why git merge always ask for a commit message?
On Monday, 3 September 2012 21:53:28 UTC+1, Mauro Sanna wrote: > > On 3 September 2012 19:45, Antony Male > > wrote: > > On Monday, 3 September 2012 18:33:03 UTC+1, Mauro Sanna wrote: > >> > >> On 3 September 2012 18:56, Antony Male wrote: > >> > On Monday, 3 September 2012 17:32:46 UTC+1, Mauro Sanna wrote: > >> >> > >> >> On 3 September 2012 18:13, Antony Male wrote: > >> >> > On Monday, 3 September 2012 12:19:11 UTC+1, Mauro Sanna wrote: > >> >> >> > >> >> >> Then I do a git checkout master, git merge devel and push and all > >> >> >> done. > >> >> >> I always have done this but now, in a new application, when I do > git > >> >> >> merge > >> >> >> devel into master it asks me for a commit message. > >> >> > > >> >> > > >> >> > In version 1.7.10, git started prompting for a commit message > after > >> >> > every > >> >> > merge. The rationale behind this is explained in Junio's (the > >> >> > maintainer's) > >> >> > blog post [1] > >> >> > >> >> Ok but, why it don't ask for a commit message when used in some > other > >> >> projects? > >> >> .git/config is the same. > >> >> Perhaps because I've set the repository using git before 1.7.10? > >> > > >> > > >> > Maybe in one project the merges you're doing are non-fast-forward (as > >> > you > >> > stated), whereas in the others they're fast-forward? Maybe there's a > >> > configuration difference? (I didn't think there was a config key to > >> > disable > >> > this behaviour, but it's worth a check). > >> > >> > >> Here the config for two of my projects. > >> The first is not fast-forward while in the second the merge is > >> fast-forward. > > > > > > There we go! Read up on the differences between fast-forward and > > non-fast-forward merges. [1] is a helpful resource. > > > > Now, as you can see, fast-forward merges don't involve an actual merge > > commit. No merge commit = no commit message. Which is why you're not > being > > prompted for a message for the fast-forward merge.n > > Yes I know, but I want my merges to be fast-forward. > Because git configuration is the same for the two projects I don't > know why the merge for first project go fast-forward while the second > one not. > What's the differerence between the two configurations? There is no > difference, so why I have a merge with fast-forward and a merge with > no fast-forward? > 'git merge' will (by default) do a fast-forward merge if it can, otherwise it will do a recursive merge. As shown by the PDF I linked to a few posts back, if you're merging develop into master (git checkout master; git merge develop), a fast-forward merge can happen if and only if develop is a direct descendant of master. That is, if the master branch contains only commits which are also contained by the develop branch. If master has commits which develop does not have, then a fast-forward merge cannot occur, and a recursive merge must be used instead. Graphically: (Use a fixed-width font to view: I know google groups uses a variable-width font by default) A fast-forward merge *can* occur: O--O--O / ^ O--O--Odevelop ^ master which will result in: develop v O--O--O--O--O--O ^ master A fast-forward merge *cannot* occur (as master contains commits which aren't present on develop): develop v O--O--O / O--O--O--O ^ master where a recursive merge will result in (M being the merge commit): develop v O--O--O / \ O--O--O--O--M ^ master If you're having trouble visualising your branch structure, use `gitk master develop` (if gitk is available), otherwise `git log --graph --oneline --decorate master develop`. You should see that, in the repository where fast-forward merges are occuring, there are no commits present on master which aren't also present on develop. In the other repository (where fast-forward merges are not occuring), you will see that there is at least one commit on master which is not also present on develop (you may have to look back a bit, to slightly before the first recursive merge occurred). Hope that helps clarify the situation. If you're still not getting it, paste (or pastebin) the output of `git log --graph --oneline --decorate master develop`, and I can point out the critical difference. -- You received this message because you are subscribed to the Google Groups "Git for human beings" group. To view this discussion on the web visit https://groups.google.com/d/msg/git-users/-/oPwwwmapb70J. To post to this group, send email to git-users@googlegroups.com. To unsubscribe from this group, send email to git-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/git-users?hl=en.
Re: [git-users] Re: Why git merge always ask for a commit message?
On Monday, 3 September 2012 18:33:03 UTC+1, Mauro Sanna wrote: > > On 3 September 2012 18:56, Antony Male > > wrote: > > On Monday, 3 September 2012 17:32:46 UTC+1, Mauro Sanna wrote: > >> > >> On 3 September 2012 18:13, Antony Male wrote: > >> > On Monday, 3 September 2012 12:19:11 UTC+1, Mauro Sanna wrote: > >> >> > >> >> Then I do a git checkout master, git merge devel and push and all > done. > >> >> I always have done this but now, in a new application, when I do git > >> >> merge > >> >> devel into master it asks me for a commit message. > >> > > >> > > >> > In version 1.7.10, git started prompting for a commit message after > >> > every > >> > merge. The rationale behind this is explained in Junio's (the > >> > maintainer's) > >> > blog post [1] > >> > >> Ok but, why it don't ask for a commit message when used in some other > >> projects? > >> .git/config is the same. > >> Perhaps because I've set the repository using git before 1.7.10? > > > > > > Maybe in one project the merges you're doing are non-fast-forward (as > you > > stated), whereas in the others they're fast-forward? Maybe there's a > > configuration difference? (I didn't think there was a config key to > disable > > this behaviour, but it's worth a check). > > > Here the config for two of my projects. > The first is not fast-forward while in the second the merge is > fast-forward. > There we go! Read up on the differences between fast-forward and non-fast-forward merges. [1] is a helpful resource. Now, as you can see, fast-forward merges don't involve an actual merge commit. No merge commit = no commit message. Which is why you're not being prompted for a message for the fast-forward merge. [1]: http://sandofsky.com/images/fast_forward.pdf -- You received this message because you are subscribed to the Google Groups "Git for human beings" group. To view this discussion on the web visit https://groups.google.com/d/msg/git-users/-/dEQoZB9xQGsJ. To post to this group, send email to git-users@googlegroups.com. To unsubscribe from this group, send email to git-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/git-users?hl=en.
Re: [git-users] Re: Why git merge always ask for a commit message?
On Monday, 3 September 2012 17:32:46 UTC+1, Mauro Sanna wrote: > > On 3 September 2012 18:13, Antony Male > > wrote: > > On Monday, 3 September 2012 12:19:11 UTC+1, Mauro Sanna wrote: > >> > >> Then I do a git checkout master, git merge devel and push and all done. > >> I always have done this but now, in a new application, when I do git > merge > >> devel into master it asks me for a commit message. > > > > > > In version 1.7.10, git started prompting for a commit message after > every > > merge. The rationale behind this is explained in Junio's (the > maintainer's) > > blog post [1] > > Ok but, why it don't ask for a commit message when used in some other > projects? > .git/config is the same. > Perhaps because I've set the repository using git before 1.7.10? > Maybe in one project the merges you're doing are non-fast-forward (as you stated), whereas in the others they're fast-forward? Maybe there's a configuration difference? (I didn't think there was a config key to disable this behaviour, but it's worth a check). > > > > Antony > > > > [1]: http://git-blame.blogspot.co.uk/2012/02/anticipating-git-1710.html > > > > -- > > You received this message because you are subscribed to the Google > Groups > > "Git for human beings" group. > > To view this discussion on the web visit > > https://groups.google.com/d/msg/git-users/-/y0ji-qYo-vcJ. > > > > To post to this group, send email to git-...@googlegroups.com. > > > To unsubscribe from this group, send email to > > git-users+...@googlegroups.com . > > For more options, visit this group at > > http://groups.google.com/group/git-users?hl=en. > -- You received this message because you are subscribed to the Google Groups "Git for human beings" group. To view this discussion on the web visit https://groups.google.com/d/msg/git-users/-/aFT01gTlGFIJ. To post to this group, send email to git-users@googlegroups.com. To unsubscribe from this group, send email to git-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/git-users?hl=en.
[git-users] Re: Why git merge always ask for a commit message?
On Monday, 3 September 2012 12:19:11 UTC+1, Mauro Sanna wrote: > Then I do a git checkout master, git merge devel and push and all done. > I always have done this but now, in a new application, when I do git merge > devel into master it asks me for a commit message. > In version 1.7.10, git started prompting for a commit message after every merge. The rationale behind this is explained in Junio's (the maintainer's) blog post [1] Antony [1]: http://git-blame.blogspot.co.uk/2012/02/anticipating-git-1710.html -- You received this message because you are subscribed to the Google Groups "Git for human beings" group. To view this discussion on the web visit https://groups.google.com/d/msg/git-users/-/y0ji-qYo-vcJ. To post to this group, send email to git-users@googlegroups.com. To unsubscribe from this group, send email to git-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/git-users?hl=en.
Re: [git-users] Size of cloned git subtrees - only history / files for subtree needed
On Thursday, 30 August 2012 11:34:52 UTC+1, Haasip Satang wrote: > > So the question actually is why does > > git clone --depth 1 --no-hardlinks *file:///*home/me/gitTests/subtreeRepo > -b subtrees/xyz *xyz * > > give me a small clone (*but only locally), *while cloning from remote I > get a big one. > What transport are you cloning over? When cloning over a "smart" transport (smart http(s), ssh, git://) a git process on the local machine communicates with one on the remote machine, and between them they negotiate which objects need to be transferred. The remote process then compresses these objects into a custom packfile, and this is transferred. When cloning over a "dumb" protocol (dumb http(s), ftp), there's no way of spawning a git process on the remote machine. Therefore the local process just has to download whatever packfiles are available. If there are no packfiles corresponding to the objects required for a shallow clone, git may (in the worst case) end up downloading the entirety of your history, even if it doesn't need to. The same goes for fetches: if the only way to get the required new objects is to download everything, this is what git has to do. I suspect you're cloning over a dumb transport, and this is what's causing the effects you're seeing. Smart http(s) has been supported by git for a long time, and, although trickier to set up on the remote side, is definitely worth it. Hope that helps, Antony -- You received this message because you are subscribed to the Google Groups "Git for human beings" group. To view this discussion on the web visit https://groups.google.com/d/msg/git-users/-/0PlD-lKA-pIJ. To post to this group, send email to git-users@googlegroups.com. To unsubscribe from this group, send email to git-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/git-users?hl=en.
[git-users] Re: Convert branch into a tag
On Monday, 6 August 2012 01:56:51 UTC+1, Trans wrote: > > > Oh, so the branch and tag names won't conflict? > > No. Branches live in refs/heads/ while tags live in refs/tags/. If you have a branch and tag with the same name, some git commands will require you to disambiguate (for example `git merge ` will be ambiguous -- disambiguation is achieved using e.g. `git merge refs/heads/`). However this is not the case for `git branch -d`. Hope that makes it clearer, Antony -- You received this message because you are subscribed to the Google Groups "Git for human beings" group. To view this discussion on the web visit https://groups.google.com/d/msg/git-users/-/_GTPT5n5isIJ. To post to this group, send email to git-users@googlegroups.com. To unsubscribe from this group, send email to git-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/git-users?hl=en.
Re: [git-users] Beginner stuck in a commit
On Tuesday, 7 August 2012 07:48:02 UTC+1, Philip Oakley wrote: > > > I'd suggest that you set up your configuration to use Notepad++ (a lovely > open source editor). There is a Stackoverflow page with details. > Set up your .gitconfig (mine's in C:\Documents and > Settings\Philip\.gitconfig) as > > [core] > editor = 'C:\\Program Files\\Notepad++\\notepad++.exe' -multiInst > -notabbar -nosession -noplugin > If you're not confident setting this up, Github wrote a little program, available as a .exe from [1], which sets notepad as the default git editor. Antony [1]: https://github.com/blog/975-gitpad-write-your-commits-in-notepad -- You received this message because you are subscribed to the Google Groups "Git for human beings" group. To view this discussion on the web visit https://groups.google.com/d/msg/git-users/-/QJicouvpWxwJ. To post to this group, send email to git-users@googlegroups.com. To unsubscribe from this group, send email to git-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/git-users?hl=en.
[git-users] Re: Convert branch into a tag
On Saturday, 28 July 2012 15:48:04 UTC+1, Trans wrote: > > Somehow I have branch that was supposed to be a tag. Not sure how it ever > became a branch, but now that I have discovered it I am wondering, how do I > convert the branch into a tag? > > Since the name will be the same for both the branch and the tag, I assume > I can just checkout the branch and tag it. > > So now I am thinking I have to delete the branch, but remember its ref id, > checkout the ref id, and then tag it. Is that right? Any other (easier) way? > > Something like the following will work fine: First, create a new tag called at the same point as the branch git tag Then delete the branch called git branch -d # You might need -D here Hope that helps, Antony -- You received this message because you are subscribed to the Google Groups "Git for human beings" group. To view this discussion on the web visit https://groups.google.com/d/msg/git-users/-/sP2qh7XPE0AJ. To post to this group, send email to git-users@googlegroups.com. To unsubscribe from this group, send email to git-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/git-users?hl=en.
Re: [git-users] Basic question: confusing messages with git merge
On 10/05/2012 12:49 am, Brad wrote: Could 'Merge branch master, remote-tracking branch origin' be what happens if I accidentally typed "git merge origin master"? If I do this, what happens exactly? Good guesswork! One of git's merge algorithms is called an 'octopus merge', and merges more than two branches together. When you run 'git merge origin master', the fact that you named two branches (OK, 'origin' isn't a branch, but bear with me) causes the octopus merge algorithm to be invoked. However, this algorithm is pretty old, no-one really uses it any more, and it's normally regarded as nothing more than a curiosity. Therefore it doesn't receive much love, and has some rather odd corner cases and bugs. One such corner case is when one of the branches it's given to merge isn't a branch at all, and is instead the name of a remote. When this happens, you get the message you described, and some other stuff -- an empty merge commit I think? And I seem to recall there's another very strange oddness. So, long story short, do not type 'git merge origin master'. If you want an easier way to merge (with less typing) read on... Do you know about git's branch tracking stuff? Basically, you can assign each branch an 'upstream' branch (defined in git's config). When you run 'git pull', git will merge in this upstream branch by default. ('git push' follows a different set of rules by default, although this might change. Read push.default in man git-config for now). When a branch has an upstream configured, '@{upstream}', or '@{u}' points to that upstream branch. You can also see whether a branch has an upstream by typing 'git branch -vv' -- the upstream appears in square brackets. So, to configure an upstream (if you don't have one set already), use 'git branch --set-upstream master origin/master', or 'git push -u origin master' if you want to push at the same time. Having done this, you can type 'git merge @{u}' (with master checked out) to merge origin/master into master. Hope that cleared up some confusion. Antony -- You received this message because you are subscribed to the Google Groups "Git for human beings" group. To post to this group, send email to git-users@googlegroups.com. To unsubscribe from this group, send email to git-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/git-users?hl=en.
Re: [git-users] Different user rights on different branches
I'm using git with SSH protocol to collaborate on our server. My question : is-it possible to give a user the possibility to push on a remote branch but not on others ? Use gitolite: https://github.com/sitaramc/gitolite Antony -- You received this message because you are subscribed to the Google Groups "Git for human beings" group. To post to this group, send email to git-users@googlegroups.com. To unsubscribe from this group, send email to git-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/git-users?hl=en.
Re: [git-users] a simple howto git webserver
On 22/04/2011 10:56 pm, badbyte wrote: Hi, i wanted to know if there is a simple howto tutorial for setting up a git webserver. Read the entirety of chapter 4 of Git Pro [1] (pages 1-11) -- that should give you a decent grounding. There are many different ways to serve git, that chapter covers all in a reasonable amount of depth. Feel free to ask if you have any further questions. Antony [1]: http://progit.org/book/ch4-1.html -- You received this message because you are subscribed to the Google Groups "Git for human beings" group. To post to this group, send email to git-users@googlegroups.com. To unsubscribe from this group, send email to git-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/git-users?hl=en.
Re: [git-users] Help with git clone
On 11/04/2011 4:12 pm, Konstantin Khomoutov wrote: On Mon, 11 Apr 2011 13:43:25 +0100 Antony Male wrote: [...] When you clone (or fetch) a repository over the git protocol, a program on your computer (git-fetch-pack) and a similar one on the server (git-upload-pack) coordinate to figure out exactly what commits (roughly speaking) needs to be sent to you. HTTP, however, is a "dumb" protocol, meaning that this approach cannot be taken. Therefore, some auxiliary files need to be present on the server, to allow your client to figure out what commits it needs to request. These files aren't generated by default -- you need to run git update-server-info after every commit in order to generate them. Being pedantic here, for clarity: this is needed to be run after every push, not commit--a push can send a whole lot of commits in one go which is a common pattern for a DVCS. [...] You're quite right -- slip on my part there. For even more clarity: When serving a repo over HTTP, the repo that your HTTP server points to should be 'bare' -- that is, it was creating using 'git init --bare', meaning it consists solely of the contents of what would normally be in a .git directory, and therefore has no working copy (no checked-out files). By convention, your bare repo's folder name ends with '.git' (eg InAJiffy.git). You then keep another copy of your repo elsewhere in your workspace, and commit to that. When you're ready to share your changes (which may consist of more than one commit), you push them to the bare repo. The post-update hook runs when the repository is pushed to, and so will run (providing it's properly configured) when you push your changes to the bare repo. Antony -- You received this message because you are subscribed to the Google Groups "Git for human beings" group. To post to this group, send email to git-users@googlegroups.com. To unsubscribe from this group, send email to git-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/git-users?hl=en.
Re: [git-users] Help with git clone
On 11/04/2011 1:15 pm, Mohith Thimmaiah wrote: Im new to git :) I have a repo which I have exposed via http at careerinsight.org/ git_repo/InAJiffy/ so that other who need to access it via http have a way to get to it Now I am able to clone the git repo locally (without http) and also via http Now strangely enough all my new changes are there in the clone done locally - but the clone over http seems to be an old one Please help !!! Im confused 1. Why are the 2 cloned repos different > 2. How can I tell the clone over http command to get the same stuff as > the clone done locally > Take a look at [1] and [2]. When you clone (or fetch) a repository over the git protocol, a program on your computer (git-fetch-pack) and a similar one on the server (git-upload-pack) coordinate to figure out exactly what commits (roughly speaking) needs to be sent to you. HTTP, however, is a "dumb" protocol, meaning that this approach cannot be taken. Therefore, some auxiliary files need to be present on the server, to allow your client to figure out what commits it needs to request. These files aren't generated by default -- you need to run git update-server-info after every commit in order to generate them. Have a look at the default post-update hook for an easy way to do this. In your case, it looks like the auxiliary files are out of date, meaning that a fetch over HTTP won't fetch any commits since the auxiliary files were created. Hope this solves your problem, Antony [1]: http://progit.org/book/ch4-1.html#the_https_protocol [2]: http://progit.org/book/ch4-5.html -- You received this message because you are subscribed to the Google Groups "Git for human beings" group. To post to this group, send email to git-users@googlegroups.com. To unsubscribe from this group, send email to git-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/git-users?hl=en.