Re: [git-users] Git changes the permissions on a file after push
On Wed, 2 Oct 2013 02:41:40 -0700 (PDT) Maximus Fedorov stm32...@gmail.com wrote: Set up gitosis, and it turns out that all users are working on behalf of one member gituser. And every time the updated files in the repository that triggered the post-retseive: #! / bin / bash read oldrev newrev refname echo REFNAME: $ refname echo if [$ refname == refs / heads / master] then cd / var / www / siteA unset GIT_DIR git pull origin master echo YOU SEND COMMIT TO *** $ refname *** fi echo Done and after that, the updated files changes owner. And it is necessary to leave The short answer: Git is not a deployment tool; Gitosis, being a front-end to Git is even less so. You have to implement a proper deployment scheme instead. The long answer. In your particular case `git pull` supposedly re-creates certain (updated) files in the work tree and since the session doing this runs with the credentials of the gitosis process, these files have their owner set to that from the credentials. You can remedy the situation by changing these credentials. A straightforward way to do this is to install sudo to the server and configure it to allow the user gitosis to run a deployment program with someone other's credentials (typically, www-data) *without asking for password.* How to implement this is beyond the scope of this discussion, but it should be noted that you *must not* just call `git pull` with modified privileges: the reason is that `git pull` not just updates files the work tree but the Git database itself, and these changes have to be done using the initial credentials (gitosis). A way to go then is to stop using `git pull` (why are you using it for this task anyway?) and instead turn to plumbing Git tools: `git read-tree` followed by `git checkout-index`; both should supposedly operate on a separate index file (created somewhere, possibly in a temporary directory using `mktemp`) made available to them using the GIT_INDEX_FILE environment variable. A sketch: cd /var/www/siteA export GIT_INDEX_FILE=`mktemp siteA.` trap rm -f '$GIT_INDEX_FILE' INT TERM QUIT EXIT git read-tree HEAD git checkout-index -a -f This code should be put into a script and *that* script should be made executable using `sudo` as explained above. An alternative is to allow the user gitosis to run /bin/sh as another user and just use a here document: sudo www-data /bin/sh -EOF cd /var/www/siteA export GIT_INDEX_FILE=`mktemp siteA.` trap rm -f '$GIT_INDEX_FILE' INT TERM QUIT EXIT git read-tree HEAD git checkout-index -a -f EOF See the git-read-tree, git-checkout-index and git manual pages (the latter explains the environment variables Git tools understand). -- 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.
Re: [git-users] Git changes the permissions on a file after push
On Wed, 2 Oct 2013 14:30:14 +0400 Konstantin Khomoutov flatw...@users.sourceforge.net wrote: [...] cd /var/www/siteA export GIT_INDEX_FILE=`mktemp siteA.` trap rm -f '$GIT_INDEX_FILE' INT TERM QUIT EXIT git read-tree HEAD git checkout-index -a -f [...] git read-tree HEAD here is stupid in fact; for your task an explicit ref representing a branch would be much better, like in git read-tree refs/heads/master -- 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.
Re: [git-users] git clone with password question very important
On Mon, 30 Sep 2013 22:26:11 -0700 (PDT) Jhovarie Guiang barik7...@gmail.com wrote: Im trying to execute git clone syntax and my syntax is git clone jhovarie@54.214.171.112:/home/jhovarie/trunk_test.git and my question is how to include my password to this syntax? example like this git clone jhovarie:(mypassword)@54.214.171.112:/home/jhovarie/trunk_test.git or git clone jhovarie@54.214.171.112:/home/jhovarie:(mypassword)/trunk_test.git this two syntax doest not work please help I really need the answer to my question. Consider employing pubkey-based authentication and an SSH agent (or, if *absolutely* needed -- for instance for unattended automated jobs -- an unencrypted key), as Thomas suggested. If using keyboard-interactive authentication is a requirement, consider running Git via sshpass [1] (simpler) or Expect [2] (harder) -- both tools allocate a pseudo TTY and are able to interact with SSH client spawned by Git as if they were the user entering the password at the supplied prompt. But again, by all means first consider deploying pubkey-based authentication! 1. http://sourceforge.net/projects/sshpass/ 2. http://expect.sourceforge.net/ -- 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.
Re: [git-users] gitignore ignored?
On Fri, 27 Sep 2013 00:53:21 -0700 (PDT) Mauro Sanna mrsan...@gmail.com wrote: [...] When I push my commits I see target and its subdirs in the repository. But target is gitignored, why is it pushed? There are several misunderstandings here: 1) Mechanisms for ignoring files in Git have nothing to do with pushing and fetching: these operations manipulate existing commits and references pointing at them. It's index updates (`git add`) and, in certain cases, work tree oprtations (`git rm`, `git clean` etc) which consider ignore lists (so that, say `git add '*'` won't add auto-built cruft added to an ignore list). 2) Mere updating of a branch in a remote repo does not do anything to the subdirs in the repository because such subdirs only occur in the work tree of a non-bare repository, and the push operation is not concerned about the work tree (short of respecting the receive.denyCurrentBranch configuration variable which forbids updating of a branch which is currently checked out in a non-bare repository). So it might be that if you actually *deleted* already tracked unwanted files and recorded a commit which does not contain them anymore and then arranged for them to be excluded by the Git file ignoring mechanism, and then updated a remote branch with your commit, you now need to actually update your work tree to the new state of the updated branch -- for instance, by doing git reset --hard in the work tree (provided the updated branch is what is currently checked out, -- otherwise a mere `git checkout that_branch` would suffice). -- 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.
Re: [git-users] Moving from svn
On Fri, 27 Sep 2013 00:29:47 -0700 (PDT) Fabien Bourigault dra...@gmail.com wrote: I'm moving my projects from svn. With svn I use ssh and a svnserve wrapper like this one : #!/bin/sh umask 002 exec /usr/bin/svnserve $@ -r /very/long/path/to/projets So I can use URI like this one : svn co svn+ssh://m...@my-server.com/my-super-project/trunk How can I achieve the same behavior with git (i.e. something like git clone m...@my-server.com:my-super-project) ? Nothing different if you're okay with having real system Unix accounts for your developer on a target system. The only problem is short pathnames of projects but I'll show ways to deal with it after explaining the basic setup. The main premise to make things work is that your Git-repositories should be group-shared. Git has support for this, but for convenience you'd better off helping it to do its part of the work properly. 1) Install Git. There's no special server-side Git binary if you intend to access your repositories using SSH [*], so just install Git like `apt-get install git`. 2) Make sure all your system accounts for Git developers are members of a single special group -- be it devel or git, -- it doesn't matter. Suppose we've picked git for this. 3) Create a central place for your repositories. On a typical GNU/Linux system conforming to FHS, I'd recommend to create the /srv/git directory (you already have /srv) and make it belong to root:git and have access rights 2755 (or 2750 if you're paranoid), that is, group writable with group sticky bit set on. 4) For each of your project, create a *bare, shared* repository by running something like this: # cd /srv/git # umask 002 # git init --bare --shared project1.git Verify that the created project directory and its files have sensible access rights -- the --shared option which is short for --shared=group ensures the directory is group-writable and has group sticky bit set on it, and the step (3) should have made the directory's owning group to be git. 5) Now try to push something to is from a client: git remote add origin ssh://m...@my-server.com/srv/git/project1.git git push origin master You can now see that you can't easily drop the leading part of the project's directory pathname from the remote repository's URL because there's no layer of indirection when accessing Git repositories via SSH: the client Git process just spawns another Git process on the remote machine after setting up an SSH channel, and hands it off the pathname. The only supported shortcut is ~ with the expected meaning. I'd say that is not really a problem because: 1) Most of the time you're working with named remotes, so you only have to type in the URL once. 2) If the repositories are located in a somewhat standardized place (/srv/git), the leading pathname part is not a big deal to type. Anyway, there's another approach which is a layer of indirection between you and Git. These days, a low-level de-facto standard tool for this is gitolite [1]. It provides *virtualized* Git users (so that you only have one system account to access Git repositories, and still each developer has their own SSH key), repository- and branch-level access controls, and more. And as a by-product, since it requires all the repositories be located under a single directory, and it knows which one, it provides for short-cut syntax, like ssh://me@my-server/myproject [*] There's a special Git daemon, unsurprisingly called git-daemon, which is able to serve Git repositories: unauthenticated and hence read-only (but you can turn certain knobs to make it serve R/W as well--in certain controlled environments this might be OK to do). This daemon works kind of like svnserve in that it allows to specify a base directory for the projects using its --base-path command-line option. 1. https://github.com/sitaramc/gitolite -- 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.
Re: [git-users] restrict history/messages on push?
On Wed, 25 Sep 2013 22:19:35 -0400 Tom Roche tom_ro...@pobox.com wrote: [...] 23rw4kf 23 Sep 2013 09:39 Foo? 98bjttr 24 Sep 2013 12:34 Rollback! Bar. 07657ab 25 Sep 2013 10:11 Arrggg! Baz. 1495fcc 25 Sep 2013 23:45 Self-serving explanation. Fred wants to push 1495fcc to the public repo, but doesn't want manager Ethel (or anyone else) to see commits=[23rw4kf, 98bjttr, 07657ab], much less those commit messages. Fred wants one of two options: [...] Another option is `git merge --squash` of 1495fcc (which is supposedly a tip or a branch) into another branch into which this one is about to be integrated. -- 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.
Re: [git-users] Static build of git
On Fri, 27 Sep 2013 11:21:27 -0700 (PDT) Jared Szechy jared.sze...@gmail.com wrote: I'm having trouble building git statically. [...] Sorry for not answering the question directly (have no time for this at the moment) but attempting to build Git statically may have little sense indeed -- please see [1]. I'd say if you have a requirement like this, consider using a tool which was created with this in mind [2]. 1. https://groups.google.com/d/msg/git-users/xjgaMTb8JWw/atQkXc5gqbQJ 2. http://www.fossil-scm.org -- 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.
Re: [git-users] Git / vcs newbie question: Sharing changes between branches
On Wed, 25 Sep 2013 02:36:39 -0700 (PDT) Michael Weise michael.we...@ek-team.de wrote: [...] One problem I'm facing is that we have different customers who get different versions of our program (programming language is C). Currently these versions are implemented with lots of #ifdefs that make the code hard to read. Not sure if this applicable to your particular situation but one way to go about solving this is modularising: you extract all the common code to a library (static or dynamic -- depends on the exact requirements) and then write a *separate* program for each customer, and each would use the library by linking with it. Yes, this *is* code duplication as these separate programs will have much in common and possibly even some exact parts but it's quite possibly this won't be code you change much. A refinement to this approach is to turn functions which have #ifdef-ed code into several (similar) functions each, or may be a single -- framework -- function which, when called, receives one of more pointers to other functions which provide bits currently coded inside #ifdefs, like this: int foo() { int x; x = quux(); #ifdef SOME blurb(x); #else mumble(x); #endif /* SOME */ return x; } turns into typedef void (* handle_x_fn) (int *); // see [1], for instance int foo(handle_x_fn fn) { int x; x = quux(); fn(x); return x; } which is then called y = foo(blurb); or y = foo(mumble); depending on which customer's program this is, with foo() being located in the library both programs share. This is called modularisation. I've consciously diverged from the topic in the hope this would be of some help, but if it is, you're better off asking about the exact techniques for modularisation in C using other venues such as Stack Overflow and comp.lang.c newsgroup available here on Google Groups. Hope this helps. 1. http://stackoverflow.com/a/1591492/720999 -- 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.
Re: [git-users] git pull: Observation for local / NFS bare repository
On Mon, 23 Sep 2013 10:10:24 -0500 John McKown john.archie.mck...@gmail.com wrote: I use git to help me synchronize my files between my work machine and home machine (both Linux based). The bare repository is accessed from my work machine via SSH. On my home machine, it is on an NFS server. As an aside, the work machine accesses the NFS server via the home machine via SSH, not directly from the NFS server. I noticed when I do a git pull, git will apparently recompress the data before sending it. This makes sense to me when it is not local, i.e. from my work machine, in order to decrease the number of bytes transmitted. But it doesn't make sense at all when the repository is local (on the local HD or NFS mounted) because the data is now coming into the machine twice. First to recompress it, then to transfer it into the working directory. Now, on my internal gig-ethernet network, this is likely not a big deal. But I am wonder if it would be a good idea to mention this to the developers. IOW, are there many people who use a bare repository over a _slow_ NFS link? Or is it so rare that it would not be worth using up their time? What's the URL you're using to access the repository on NFS? The trick is that if you're using the explicit file:// scheme Git spawns two processes which then communicate even if this happens on the local host. Conversely, if you're using just a regular (full) Unix pathname, like /a/path/to/the/repository, Git tries to be more clever when accessing it, and even does hardlinking where applicable. Not sure this makes sense for your situation though... -- 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.
Re: [git-users] extracting subdirectory from git repo
On Fri, 20 Sep 2013 09:54:57 -0700 (PDT) Gabriel Marchesan Almeida gabrielmarche...@gmail.com wrote: Konstantin, me again. I have realized that when running your commands directly on prompt command, they work pretty fine and I have an output on /tmp/valid, which is exactly the TAG i want to keep. However when putting the command in a bash script, I have always empty /tmp/valid. I am having problems to figure out where the problem is coming from. A couple of points: First, remove the subshell (...) which is in front of | sort -u ... as it's not really needed -- a simple pipeline would do just fine: git rev-list --branches | while read c; do git tag --contains $c; done | sort -u /tmp/valid Next, just verify every part of the pipeline works as intended, that is: 1) Place a call git rev-list --branches before the pipeline and see if it prints a set of SHA-1 names. 2) Place a call to `git tag --list` before the pipeline to verify the tags are there. 3) Replace `git tag --contains $c` in the `while` body with mere `echo $c` and see if that works. Next, it's almost always advisable to run the script with the fail on errors and fail on undefined variables flags turned on, which is done by executing set -e -u in the script. This helps detect subtle errors. Next, while `set -e -u` is usually a must, this does not prevent faulty pipelines from failing (a really brain-dead property of the standard Unix shell). If (and only if) you're using bash, make it fail on faulty pipelines by running `set -o pipefail` and hence the recommended thing to include in the script is set -e -u -o pipefail This way bash will die with an error message as soon as any program it calls anywhere exits with a non-error exit code. Last, in scripts, never hard-code names of temporary files -- use mktemp instead: FNAME=`mktemp git.` trap 'rm -rf $FNAME' TERM INT EXIT ... sort -u $FNAME ... ... grep -f $FNAME Small area of my script. http://screenpresso.com/=zAske Next time please use a pastebin service [1] like, uh, pastebin.com, or https://gist.github.com/ and so on -- they're in abundance. There's no need to use graphics to present text. 1. http://en.wikipedia.org/wiki/Pastebin -- 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.
Re: [git-users] git and sudo
On Thursday, September 19, 2013 11:20:30 PM UTC+4, John McKown wrote: Are you using Linux as a system and ssh as the transport? If so , then perhaps you can try putting the command: export GIT_SSH=ssh -i ${HOME}/.ssh/id_rsa before you do your sudo command. The -i ${HOME}/.ssh/id_rsa points to the ssh key file to use. Because you use the -E switch on the sudo invocation, this environment variable will be passed to the perl script and should be picked up by git. Not that simple, unfortunately. The contents of the GIT_SSH variable is not passed to /bin/sh, so multi-word thing is not gonna work as expected. But one could wrap the whole call in a shell script and set GIT_SSH to its full pathname. Can't hurt (much) to try, I hope. On Thu, Sep 19, 2013 at 12:51 PM, jon heckman ninj...@me.com wrote: I have a ruby script that interacts with git heavily. I run the entire script in sudo -E (this is needed for reasons other than git) I can do git checkout {branch} just fine. However I get asked for the root@git... password when I try to fetch. I tried using su to make it work but it still asks for the password (I do not have to use 'su' when doing git checkout {branch} su ENV['USER'] -c 'git fetch' Due to what this script is doing, not running it in sudo -E is not an option. -- 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/groups/opt_out. -- As of next week, passwords will be entered in Morse code. Maranatha! John McKown -- 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.
Re: [git-users] Git svn clone - error 128
On Tue, 17 Sep 2013 08:54:07 -0700 (PDT) Paul McGregory mcgregory5...@gmail.com wrote: I am trying to clone a old svn repository with the following line git svn clone --stdlayout --ignore-path=[^/](?:branches|tags) -A authors.txt svn://host/var/svn/myrepository It´s running well until a special Revision: Initializing parent: refs/remotes/tags/test@2056 fatal: Not a valid object name ls-tree -z ./: command returned error: 128 Judging from what I see, the error comes from the Git::SVN::Fetcher Perl module (one of those on top of which git-svn is implemented), from one of two occurences of this statement command('ls-tree', '-z', $self-{c}, ./$gpath) with that command making a quite involved work to construct and exec() a Git command. My Perl is pretty rusty (and for good!) so I failed to decypher what happens down the command() path my stab at it is that $self-{c} happens to be an empty string (instead of the SHA-1 name of a commit) in one of these calls under the circumstances you hit and the actual command constructed by Perl just *drops* it, that's why you're seeing ls-tree -z ./ and not ls-tree -z SOME_SHA1_HASH ./ in the output; consequently the `git ls-tree` command tries to interpret ./ as a name of a commit and fails at it, printing fatal: Not a valid object name. The fact an empty string gets completely wiped off when constructing a command to call makes me think you're on Windows, right? Anyway, this has nothing to do with the problem at hand. Some idea? Yes: you've probably hit a bug so post a message to the main Git list [1] (and please read [2] before doing so). Please make sure that: 1) You do not send a HTML-formatted message there. 2) Do not just post a link to this thread (it's a good thing to do but only at the end of an actual problem statement). 3) Provide much more info on your environment: OS and Git version (and its distribution, if applies). 4) Prepare to requests for making a dump of your Subversion repo available. Or at least prepare to test proposed patches. You can freely quote my quick stab at analyzing your problem. 1. http://vger.kernel.org/vger-lists.html#git 2. https://gist.github.com/tfnico/4441562 -- 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.
Re: [git-users] Re: How tell git-bush which new private key to use
On Mon, 16 Sep 2013 07:20:47 -0700 (PDT) berd bersc...@googlemail.com wrote: [...] I make this, convertet the key to OpenSSH key and move to %HOME%\.ssh folder and choos the name vorm mykey_130903 to id_rsa And I call GIT bash in folder who is my reopsitory and enter: git pull From git.repository.my b160ca3..a306100 master - origin/master Yes, this means your local Git downloaded all the objects required to update your origin/master branch from commit b160ca3 (it pointed to) to commit a306100, and now it points to that commit. There is no tracking information for the current branch. [...] * branchmaster - FETCH_HEAD I think it works :-) Or what do you mean? Yes, fetching definitely works now. As to how to go about `git pull` refusing to merge, it's completely unrelated story -- just digest what Git printed to you and act how you think would be best for you. You could consider reading my posts where I tried to expain in detail how `git pull` works internally -- [1] (simpler) and [2] (more hard-core). Also consider starting from reading [3] or may be even right from The Book: [4], [5] (reading the whole book is recommended). Thanks for your help and sorry my english. No problem! It's purposedly mangled English (like the so-called leetspeak, for example) which puts people off, not honest attempts at writing correctly. 1. https://groups.google.com/d/msg/git-users/4CBW6DY0pDA/bs97usaQ-6MJ 2. http://stackoverflow.com/a/18787744/720999 3. http://longair.net/blog/2009/04/16/git-fetch-and-merge/ 4. http://git-scm.com/book/en/Git-Basics-Working-with-Remotes 5. http://git-scm.com/book/en/Git-Branching-Remote-Branches -- 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.
Re: [git-users] Are there overlay icons in Git?
On Sat, 14 Sep 2013 14:03:38 -0700 (PDT) Anton Barycheuski anton.barycheu...@gmail.com wrote: I use Git 1.8.3 (git-scm.com) on Windows 7. Are there any variants for showing git overlay icons in Windows Explorer like TortoiseSvn? No it's impossible and supposedly will never be: TortoiseFoos use deep Windows Explorer integration which spawns a per-user copy of a special caching program (which runs in the background and can only be seen via Task Manager or a similar tool) to make cost of supporting these overlays in terms of performance acceptable (which comes at a price of sometimes being slightly out of sync with the reality). Git for Windows itself is just a set of standard Git tools which do not know anything about Windows Explorer. This situation is most probably unlikely to change (and for good, IMO). On the other hand, good GUI Git front-ends exist, with various levels of integration into Windows Explorer: * Folks behind Git for Windows develop their own (cross-platform) front-end called Git Cheetah which is bundled with Git for Windows. It does integrate into Windows Explorer. Not sure about whether it supports overlay icons. * There exists TortoiseGit front-end which quite resembles TortoiseSvn when it comes to visual appearance and workflow, overlay icons included. * Git Extensions [1] is my personal favorite in this category. It does not integrate with Windows Explorer (or may be I opted out of it -- I can't remember) but it's a quite feature complete front end with one crucial property compared to TortoiseGit: it's *not* trying to force you to assume a Subversion-like mindset when working. Git is really different from Subversion and attempts to make Subversion converts to feel themselves in a familiar environment are deceiving. 1. http://code.google.com/p/gitextensions/ -- 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.
Re: [git-users] Are there overlay icons in Git?
On Sat, 14 Sep 2013 14:03:38 -0700 (PDT) Anton Barycheuski anton.barycheu...@gmail.com wrote: I use Git 1.8.3 (git-scm.com) on Windows 7. Are there any variants for showing git overlay icons in Windows Explorer like TortoiseSvn? ...a quick followup regarding Git Extensions: it offers several packages for download, of which one includes the latest Git for Windows package and another one missing it. So you can have a side-by-side installation of stock Git for Windows and this front-end. -- 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: Problems migrating from Perforce to Git
On Wednesday, September 11, 2013 5:05:07 PM UTC+4, EricP wrote: In order to start our trial with the Git tools and workflow, we need to migrate the Perforce repository, or at least a few branches, to a Git repo. So I've started trying the git-p4 tool (running msysGit 1.7.11 on Windows 7 x64, python 2.7.2) but I get this error: fatal: git was built without support for (NO_PYTHON=YesPlease) The git-p4 tool is actually a Python script. Has anybody ever ran into similar problem? Either with git-p4 or any other tool / extension? Git as of present does not mandate presence of Python to work (only Perl for certain tools like git-svn and Tcl/Tk for two stock GUI tools) [2]. Hence Git for Windows does not currently include Python support though a dirty first stab patch exists [1]. I'm now considering having a virtual machine running some Linux distro to be used as a conversion sandbox. I think this is the only viable alternative currently short of helping guys in the Git for Windows project to get Python in the right shape. 1. https://groups.google.com/forum/#!searchin/msysgit/python/msysgit/-8ppNpG08IE/UNyGmxnRZVwJ 2. https://groups.google.com/forum/#!searchin/msysgit/python/msysgit/yy-yPNxaxgw/uT2Gynxh47AJ -- 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.
Re: [git-users] How tell git-bush which new private key to use
On Thu, 12 Sep 2013 05:47:07 -0700 (PDT) berd bersc...@googlemail.com wrote: Do you have to keep the test key or you just want to *replace* it with the production key? I want replace the test key to production key. Okay. Next time please write your intent clearly -- that would have saved me from typing 60% of my first answer :-) If replacement is needed, then just overwrite the id_rsa and id_rsa.pub files in your %HOME%\.ssh folder with the new ones (they might also be named id_dsa[.pub], and the .pub file (the public part of the key) You mean, I can the new key only copt in folder g:/.ssh/ As it turns out based on the new information from you, not quite. I'll explain why in a moment. A point to note is still, the name of my nek key ist mykey_130903.pub and mykey-privatekey_130903.ppk is this important? That's good you mentioned this (again, note that the more information you tell the better for everyone). The extension .ppk suggests this is the key generated by PuTTY's key generation tool (puttygen.exe) *in its own container format,* not compatible with the OpenSSH client distributed as part of Git for Windows. A corollary to this is that there's no sense in putting those keys into %HOME%/.ssh -- the OpenSSH client can't make use of them anyway. That mykey_130903.pub had most probably been extracted from the .ppk key (using that same puttygen.exe tool) and given to you so you could make your private key trusted on the remote system (that thing is beyond the scope of our present discussion though). Can you verify your .ppk key is generated by PuTTY? Open it in a text editor and look at the first line -- does it read something like PuTTY-User-Key-File-2: ssh-rsa or -BEGIN RSA PRIVATE KEY- Which one? The first means it's a PuTTY-compatible form, the second means it's an OpenSSH-compatible form. If the key would turn out to be of the *second* form, just copy it under %HOME%\.ssh and name it id_rsa -- possibly replacing whatever key is already there under that name. Now remove all the Host-entry hacks you might have in your %HOME%\.ssh\config file. If, instead, the key turn out to be PuTTY's, you have two options: * Get PuTTY and convert your .ppk key file into an OpenSSH-compatible format using puttygen.exe. You run puttygen, click the Load button in its interface, enter the key's passphrase to decrypt the key then engage the Conversions - Export OpenSSH key main menu entry; when asked for a file to save, navigate to your %HOME%\.ssh folder and choose id_rsa as the name of the file. * Work with PuTTY as I described in my previous mail and just use this .ppk key file. To do this, you first set up Git to use PuTTY's plink.exe as its SSH client (via setting the GIT_SSH environment variable), then start pageant.exe (the key agent), activate the context menu on its tray icon, choose the Add key entry then select your .ppk key in the dialog, and enter the key's passphrase when asked. Sorry, I forgot to write that I'm using TortoiseGIT. TortoiseGit relies on calling stock Git binary and so respects the GIT_SSH setup already explained. You can also just use plain Git along with this front-end. ssh -T -vvv user@host git --version sh.exe: c:xampphtdocsworkspace_aptanarepositorisbmykey_130911.ppk: command not found Something awry with the formatting. And I have no idea why the key file is mentioned -- as I've say, if .ppk is not just a brain-dead extension and key is PuTTY's, stock SSH client won't work with it. Here is first error, my key, that I use ist mykey_130903.ppk not mykey_130911.ppk That's not the problem, I reckon. eval $(ssh-agent -s) Agent pid 9528 ssh-add mykey_130903.ppk That's strange! It *might* turn out that just the person who handed you this key is idiot, and the key is in OpenSSH format indeed. Anyway, I gave you enought information to deal with either case. after this I make pull git pull and get following message: fatal: Not a git repository (or any of the parent directories): .git As you should have guessed by yourself, this error has nothing to do with keys and SSH: it simply tells you you're currently not in a directly which Git is able to identify as the work tree of a Git repository. Change the directory to a real repository and retry. -- 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.
Re: [git-users] How tell git-bush which new private key to use
On Wed, 11 Sep 2013 05:03:27 -0700 (PDT) berd bersc...@googlemail.com wrote: [...] Now to testing we created new ssh key, but to working, we use other ssh key. For me is the question, how can I tell git-bash to take the new ssh key? [...] Do you have to keep the test key or you just want to *replace* it with the production key? If replacement is needed, then just overwrite the id_rsa and id_rsa.pub files in your %HOME%\.ssh folder with the new ones (they might also be named id_dsa[.pub], and the .pub file (the public part of the key) is not strictly needed -- it can always be regenerated from the private key, and it does not participarte in authentication). If you want to have both keys, continue reading. http://superuser.com/questions/232373/tell-git-which-private-key-to-use but both do not work quite. [...] The solution at the quoted link is the correct one for your case. How exactly did it not work out? Did you try to log in via plain SSH client and not make Git call it for you? -- this is the first thing to try when debugging. Open Git bash and run something like ssh -T user@host git --version there and see if it a) succeeds, and b) prints of the version of Git running on the remote system. If it fails to log in, try to pass one or more -v options to ssh -- the more you pass the more chattier it becomes, -- so try ssh -T -vvv user@host git --version Does this printout mention SSH reading the correct key file? Does it tell anything about failure to locate or read or parse it? Yet another approach to the problem is to switch to using the so-called SSH key agent -- this is a program which sits in memory permanently, and maintains decrypted private keys, which you submit to it exactly once, and when an SSH client tries to authenticate to the server using a private key it first tries to find and contact the key agent, and if it succeeds, asks the agent for the keys it has, and tries to use them. Stock Git for Windows includes a port of OpenSSH client, and so it includes the ssh-agent.exe binary. You can use it like this: 1) Start Git bash. 2) Run eval $(ssh-agent -s) which would a) place the agent into memory, and b) equip *this session* of Git bash with the necessary knowledge about how to reach the agent. 3) Run ssh-add /path/to/your/private/key/file several times for each of your keys, entering the passphrase for each. 4) Next time you run ssh it will try to contact the agent and get keys from it. 5) Before closing Git bash, run kill $SSH_AGENT_PID to shut down the running agent. If you won't do this and will just close the Git bash, the agent will remain in memory, and the next Git bash shell *won't* reuse it. On the other hand, having it in memory won't hurt other than occupying it -- you could kill it any time using Task Manager. You might customize this sort of setup by tweaking various per-user bash configuration files -- it could achieve running the agent at opening Git bash and killing it when Git bash closes. Personally, I don't have a ready to offer knowledge of how to do this, but it's doable. Another approach with the key agent is to switch to using PuTTY [1] instead of using the OpenSSH agent shipped with Git for Windows. PuTTY's advantage is that it's better integrated into the system, and its key manager (pageant.exe) comes in a form of a GUI app which sits in the system notification area (the tray). To use putty, you'll have to permanentry set the environment variable GIT_SSH (on a system or user level) to something like %ProgramFiles%\PuTTY \plink.exe Note that TortoiseSVN and TortoiseGit come with their own patched version of plink.exe which is able to ask mandatory quesions using a GUI dialog. So if you have one/want to use it, you could set your GIT_SSH to something like %ProgramFiles%\TortoiseSVN\bin\TortoisePlink.exe Note though that TortoiseFoos do not include the full stack of PuTTY utilities, so you have to install it anyway to use its key agent. A complete step-by-step guide (with pictures galore) on how to set up Git for Windows to work with PuTTY including using the key agent is [2]. 1. http://www.chiark.greenend.org.uk/~sgtatham/putty/ 2. http://nathanj.github.io/gitguide/index.html P.S. For the future, please note that it's futile to ask for help while provifing zero information about how the faulty program actually fails -- did not quite work is not the statement of a problem. -- 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.
Re: [git-users] git rm ./
On Wed, 11 Sep 2013 11:43:24 -0700 (PDT) superjag superja...@gmail.com wrote: Silly me, I thought this would remove the project directory from the staging area, but no, it has to delete the entire project. I was still staging my first commit when my project got deleted, so I can't roll back. I found this: https://groups.google.com/forum/#!topic/msysgit/TLmc2996nWY But while I can see my files in some kind of command-line editor, I can't save them. ESC:w just makes a beeping noise. Any ideas? I'm running git under Windows. Uh... If I can see my files in some kind of command-line editor, I can't save them. ESC:w just makes a beeping noise. means I have run `git show $sha1_name_as_shown_by_git_fsck` and this command showed me the contents of my file in some kind of command-line editor then it's just Git spawned the so-called pager which, unless reconfigured by the user (you) in one way or another defaults to the program named less [1] which is distributed with Git for Windows. A pager consumes what another program sends to its standard input stream (this program is Git in our case) and allows the user to conveniently (okay, let's not discuss this aspect for a moment) view this input -- sort of read-only ad-hoc Notepad. less is ubiquitous in the Unix world but is certainly able to capture a Windows user by surprise. To quit less just press the q key (for *q*uit), and to move the viewport use the page up/page down and cursor keys. less is quite versatile -- hit the h key while in it to read its online help page. But back to your problem... The final answer to the thread you referred to assumed you're familiar with command line, and supposed that you know about stream redirections supported by it. Specifically, if a program prints something to its output, you're able to save this output by redirecting it to a file, like this: git show $sha1name filename The filename (also could be spelled without the white space -- filename) is the crucial bit -- it would make `git show` to write whatever it prints to the file filename. Git took your by surprise because it tries to be smart and if it detects it was run on an interactive terminal and the output it's about to print is larger than the height of this terminal, it spawns the configured or default pager and sends its output there. If it detects its output is redirected by the shell (that filename thing) it just prints what it should print, and this output ends up being written into that file. See also [2]. 1. http://en.wikipedia.org/wiki/Less_%28Unix%29 2. https://groups.google.com/d/msg/git-users/nn3f6FVMSNw/NryIUTdKvFYJ -- 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.
Re: [git-users] Re: Need sine help on Git hooks
On Wed, 4 Sep 2013 11:39:21 -0700 (PDT) Ling oylf1...@gmail.com wrote: Thanks Konstantin, Yes I tried git log $newname $(git merge-base $oldname $newname) and it works fine. That is not quite correct a call -- the proper one is git log $newname ^$basename or, expanded, git log $newname ^$(git merge-base $oldname $newname) Notice the ^ character in front of the second commit -- it's meaning is to exclude all commits reachable from the following revision specification from the set of commits defined by the first revision specification. See the Specifying Ranges section of the gitrevisions manual [1]. I, indeed, did not use ^ for the $basename argument in my previous e-mail to this thread (from which you seem to have finally copied the code), as I was in a hurry. My apologies for confusion. 1. https://www.kernel.org/pub/software/scm/git/docs/gitrevisions.html -- 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.
Re: [git-users] Using Git as a user documentation source file repository
On Wed, 4 Sep 2013 21:17:39 +0400 Konstantin Khomoutov flatw...@users.sourceforge.net wrote: My organization is thinking about Git as a repository for FM+SMGL source (binary) files. We have very minimal requirements: * ability to check in / check out multiple files at the same time Yes. After re-reading your question with a fresher state of mind, I now think you might be confused about how DVCS works, and so you might either reconsider your intention to use a system of this class or adjust your expectations about it. A hallmark property of a DVCS is that each repository has the complete history with all the commits comprising it. This means commits (recording new revisions) only ever happen in the repository itself, and each commit captures a complete state of the project. This means, you can't really check out several files from a DVCS (to some place), edit them and then check them in, making a DVCS record a synthetic commit based on these files only and everything else. This kind of thing is doable with Subversion, for instance, where you are able to check out just a single directory out of the whole project and commit just a single file, making the server synthesize a commit representing a full project state no one yet have seen locally. In Git, you can normally (but see below) only check out a single branch (or a specific commit), and this action does two things: * The work tree -- a place where the checked out files are stored, and where you modify them -- is populated by the state of the *whole* project as recorded in the commit being checked out. * The staging area -- a special place from which a commit is made -- is populated with the state of files checked out into the work tree. That is, normally your work tree has the entire project checked out, and that's how Git works. Now there's a special Git feature called sparse checkouts [1] -- when enabled for a repository, it allows you to only check out an explicitly configured set of directories to not waste the space under the work tree. There seems to be no way to only check out specific sets of separate files using this feature though. [...] 1. http://briancoyner.github.io/blog/2013/06/05/git-sparse-checkout/ -- 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.
Re: [git-users] Re: Need sine help on Git hooks
On Wed, 4 Sep 2013 16:59:14 +0400 Konstantin Khomoutov flatw...@users.sourceforge.net wrote: [...] For each ref to be updated: 1) Call `git merge-base $oldname $newname` -- this will give you the name of a commit which is common between the old and the new state of the ref. In the simplest case -- a fast-forward of the ref this will be the old tip commit of that ref ($oldname here), in a more complex case, where a user did a forced push which replaced some (or all) of the ref's history, this will be the nearest (to the prospective new tip) commit which won't be replaced, and this means its log message has already been checked at some point back in time. 2) Having obtained this base commit, call git rev-list $newname ^$basename [...] 3) Iterate over the generated list, calling git cat-file -p $sha1name [...] I've just tried, and `git log $newname ^$basename` just did the right thing, so if you are okay with a coarse-grained approach, checking each ref reduces to grepping the output of git log $newname $(git merge-base $oldname $newname) (possibly further instrumented with approptiate --format command-line option). -- 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.
Re: [git-users] Default remote?
On Wed, 4 Sep 2013 07:43:40 -0700 (PDT) Juha Aaltonen turbosc...@gmail.com wrote: Is there a way to put a default remote repo for remote repo operations such that it's used if the remote repo is omitted from the command line? It's irritating to have to write the long remote repo path part of which sometimes looks like ciphered. git remote add foo ssh://me@myserver/a/long/path/to/my/repo and then git push foo master otherbranch andanotherbranch -- 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.
Re: [git-users] Re: Need sine help on Git hooks
On Wed, 4 Sep 2013 07:15:43 -0700 (PDT) Ling oylf1...@gmail.com wrote: I think what we want to have a hook that on the server repository to prevent the local pushes, so I think if we using git log on the server repo, this won't protect us Why? Using a pre-receive hook to check what has been pushed is the right way to go: as I have written in my first mail to this thread, it suffices to quit the hook with a non-zero exit code to make the push operation abort; everything you'll write to the standard output stream of a process executing as this hook will be delivered to the pushing client (and supposedly shown there). since git log is only created after local pushes, right? No. The git log does not exist. A Git repository is a directed acyclic graph (DAG) of interliked commits; this graph has several named entry points which are named refs -- these are branches and tags. Each ref points to a commit object, and each commit object references one or more parent commit objects -- thus forming a DAG. The `git log` program takes a revision specification which tells it which commits it should select from the whole DAG, it then traverses this selection of commits (this process might be controlled by various command-line options passed to `git log`) and outputs certain information about each commit as it walks. Let's reiterate: there's no such thing as a log -- it's a purely synthetic thing which is produced by `git log` each time you call it, and what it produces depends heavily on the command-line arguments used to call `git log`. and also since when our developers clone the repo to theri locals, and hooks won't be cloned, so we need to have a way to check each developers push to protect our server repo to have the correct codes. So do you have any suggestion on how we can have this ? You're on the right track. The problem is that you seem to just have bypassed all the text I've written in my mail, without analysing it and possibly refining your question, and asked the same questions again for the third time. This is not at all constructive. -- 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.
Re: [git-users] Re: Need sine help on Git hooks
On Wed, 4 Sep 2013 06:50:47 -0700 (PDT) Ling oylf1...@gmail.com wrote: Thanks Konstantin and quesiton? you mean git log $newname ^$basename, and is the $newname $basename are: newname is the after pushed refs/heads/Lingfei_test2? and basename is before pushed: refs/heads/Lingfei_test2? No, $newname and $oldname are the SHA-1 names of the prospective new commit for the ref being updated, and its current tip commit, respectively. Did you read the githooks manual page? It tells in clear simple words how a pre-receive hook is passed the information about which refs are about to be updated by the current push operation, and how. That's what you're supposed to parse and use. $basename is the the SHA-1 name of the commit obtained by the call `git merge-base $oldname $newname`. -- 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.
Re: [git-users] Using Git as a user documentation source file repository
On Wed, 4 Sep 2013 09:55:05 -0700 (PDT) Chris Bridgen christopherpbrid...@gmail.com wrote: My organization is thinking about Git as a repository for FM+SMGL source (binary) files. We have very minimal requirements: * ability to check in / check out multiple files at the same time Yes. * ability to download entire sets of files to another server No. You can only transfer objects from one Git repository to another. The granularity of this history is a single branch or a tag. You can transfer arbitrary number of them at a time though, and the transfers are incremental, of course, -- only the information which is missing in the receiving repository is transferred. But Git does not offer any notion of a file (or a directory) in its native protocols. On the other hand, if to another server is OK to mean to a Git repository on another server then the answer is yes. The receiving repo can then be accessed with the usual Git commands to extract arbitrary files from it. Another alternative which might be applicable is the `git archive` command which can be used to produce an archive file containing the snapshot of the selected repository state. * ability to restrict some user's ability to create new branches/folders No with plain Git. On the other hand, front-ends exist which implement ACLs with this granularity. gitolite and gitosis are popular choices (with the former one appearing to be a very popular pick these days). -- 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.
Re: [git-users] starting out with git -- a problem with branching....
On Tue, 3 Sep 2013 10:20:06 -0500 John McKown john.archie.mck...@gmail.com wrote: If you don't want to do a commit, then do a stash. It puts the current working directory off to the side. Like a temporary branch. This comparison is quite to the point -- the `git stash` command even allows to create a new branch from any stash entry. When you want to come back, then you do a git stash pop. I think I understand how you're working. You likely only do a commit when you think something is finished. I, on the other hand, think of commit as take a checkpoint. Again, a very good suggestion. To those introduced to video games, I like to explain commits as saving the game just before opening a door to a yet not visited room with your gun ready ;-) [...] -- 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.
Re: [git-users] starting out with git -- a problem with branching....
On Tue, 3 Sep 2013 08:05:23 -0700 (PDT) maya melnick maya778...@yahoo.com wrote: [...] but I imagine in other situations, to have to commit every time before switching branches is weird... what if you haven't finished work on a branch and need to switch branches to take care of another problem, but don't want to commit what you just did because, well, you're not ready to commit? ;-) You do not *have to* commit -- if you dislike the idea of work-in-progress commits, then just use stash -- it was invented precisely for dealing with such scenarious when you want to disrupt your hacking session to switch to another branch temporarily to do, say, a quick fix. But it helps to actually ponder the possibility of throw-away commits even if you do not intend to use them. This is because in Git philosophy your *local* (unpushed) history is not sacred (this is in stark contrast with certain other DVCS systems, for instance, Fossil [1] in which each commit is cast in stone), and you're free to manipulate it however you're pleased to do so until it's pushed somewhere else. This allows you to spit a series of miniscule dirty commits and then lump them together to form a larger beautiful commit or several of them and bless the result as something you intend to share or publish. If you lament the fact the work tree is not tied to a branch then there's nothing which could be do to it -- this is the design choice, and Git developers are highly unlikely to ever change that. It also helps pondering that there are technical difficulties implementing such affinity: what to do with untracked files? Obviously, when you hack a feature, you're likely to create new files -- should Git auto save them when you switch branches? Yes? But what if while hacking that feature you performed a test run of your program and it spewed a few hundred gigabytes of tracing data to your work tree? Saving just everything hence has unexpected (and possibly crazy) hidden costs, and not saving everything has the great WTF potential. So in fact what Git does is a) simple and predictable, and b) has low WTF potential once you know the rules (and you do now). 1. http://www.fossil-scm.org -- 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.
Re: [git-users] Multiple clones of the same remote repo
On Mon, 2 Sep 2013 06:36:08 -0700 (PDT) Juha Aaltonen turbosc...@gmail.com wrote: Does git get confused if I have multiple clones of the same remote repo? No. The essense of a DVCS system (Git is a DVCS) is that all repositories are independent and self-contained. Despite this, in many cases it's convenient to make a repository possess some extra knowledge of the other repositories it contacts -- and Git has support for this -- but this does not create any dependencies between the repositories which have such knowledge about each other. Specifically, a repo which has been cloned records no fact this had happened [1]. Conversely, Git makes every clone know what repository it has been created from -- this is to ease the common case where you're likely to contact that same repo again from the clone. But this knowledge is very easy to remove completely, and any repository is able to know about any number of repositories, not just about a single one. What I mean is that in one clone I've made commits (and pushes), and the other clone hasn't seen them. It's unclear if you're just stating a fact or are actually wondering why this happened. If that took you by surprise then again you have to clearly understand that all Git repositories are independent from each other and new commits only ever appear in them at the discretion of their users -- either when they record new commits or when they fetch (and possibly merge or rebase). In other words, to get new data into a repository you must either create it by yourself (commits) or fetch it from somewhere else (`git fetch` / `git push`) [2]. I seem to have some problems pulling to the clone that hasn't been used for commits/pushes. On the other hand, the pull reports a lots of conflicts, but fetch says it's up todate. This is because `git pull branch` is `git fetch branch` followed by `git merge tip_commit_on_fetched_branch` which is performed against the branch which is currently checked out. So either you have a wrong branch checked out when doing `git pull` or you have local modifications, so Git is unable to reconcile these changes with those it is about to bring in when attempting a merge. Since you have provided exactly zero information about how exactly it went wrong, it's hard to judge more precicely. In a cases like this, it's best to drop into a shell and perform the necessary commands by hand: this allows you to just copy-and-paste whay you entered and what Git output. [...] I just wondered if the same username with clones both having and missing commits could confuse Git. Definitely not. 1. Well, techincally it's possible to script a repository using the so-called hooks so that a record of some form is done when another Git instance fetches data from this repository. But this would be a a non-standard setup, and Git itself would not be able to make any use of this anyway. 2. Again, technically a repo might be armed with special hooks which would push changes into another repo after a push happened. Certain mirroring schemes are implemented this way. But again, this is a non-standard setup (which is also pretty complicated to get right). -- 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.
Re: [git-users] Regarding cloning and best practices
On Wed, 28 Aug 2013 07:55:11 -0700 (PDT) Jaace jb5...@gmail.com wrote: [...] I made a repo as a starting point for all my projects -- the idea here is to clone this repo to use as a base for any new project I start. I want to be able to clone it and then never check it back into the repo I cloned it from, but instead create a *new* repo for that specific project. When you clone a repo, it sets up a .git directory and all that but if I were to push any changes, that would push them back to the original I cloned it from, right? No. `git clone`, being a pretty high-level command, does certain convenience magic with the local repository it creates and populates, which ties it to the original repository. But in fact these ties are very loose, and are rooted in a single bit of the local repository configuration, which is the named remote -- origin. `git clone` goes like this: 1) Initializes a local repo (possibly creating a directory for it first). 2) Adds a single remote named origin to the repository's configuration. 3) Runs `git fetch origin` which makes Git fetch all the branches the remote repository has, and create a single so-called remote branch (these are those origin/master, origin/devel etc branches you can list by running `git branch -r`) for each branch the remote repository has. 4) It then asks the remote where its HEAD reference points, and, if it points to a branch (true in 99.9% cases), creates a local branch in your repository which is linked to the matching remote branch in it (created in step 3). Most of the time remote repositories, being bare, have their HEAD point to a branch named master, and that's why `git clone` most of the time ends up creating a local branch master which is set to track the remote branch origin/master. If you feel yourself lost in these remotes, remote branches and remote-tracking branches, then read [1] and [2], in this order (reading the whole book before embarking on using Git is highly recommended); also see [3]. So is the proper way to go about doing what I want to simply delete the .git directory that comes with the cloned copy and just git init a new one or is there a better way to do this? It's so simple it's ridiculous -- just do git remote set-url origin GIT_URL_OF_ANOTHER_REPOSITORY and then all Git commands to which you supply the name origin would reach for that new URL. That URL, obviously, should be of a new repository (supposedly created somewhere using `git init --bare`). 1. http://git-scm.com/book/en/Git-Basics-Working-with-Remotes 2. http://git-scm.com/book/en/Git-Branching-Remote-Branches 3. http://gitready.com/beginner/2009/03/09/remote-tracking-branches.html -- 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.
Re: [git-users] Two way mirroring because over network zones
On Wed, 28 Aug 2013 08:46:25 -0700 (PDT) Anders Sveen anders.r.sv...@gmail.com wrote: We have an set up with two network zones. One is the secure zone (no internet access) and the other is the dev zone. Strangely development will happen in both zones, not just the dev zone. :) I use Gitolite to manage rights. Between the zones I have one opening: Ssh from one machine in the secure zone to one machine in the dev zone. So I want to establish both these machines as Git repo's that clients in each zone pulls and pushes from. And I was hoping changes would flow seamlessly between the two hosts in seaprate zons. How can I sync between them? I have looked into the clone --mirror option, but from what I can gather a remote update will actually overwrite changes done to that repo, so it would not work two way. I have managed to get a setup where I pull from both via a clone with added remotes, but this seems cumbersome and doesn't include all branches by default. I'm afraid the setup you intend to create cannot really be implemented in an automated fashion simply becase you're facing a case of multi-master replication with no way to automatically sort out arising conflicts. I mean, if someone updates a branch named master on the dev machine and someone else updates the same-named branch on the secured machine, you're facing a fork, and since branches in Git are light-weight (have only the single head and are in fact fully defined by it solely) you can't just have this fork maintained at a central rendez-vouz repo, and hence you ought to have a human (an integrator) to deal with it. So my proposition is to have double mirroring: each of the boundary machines should have full sets of bare repos -- one set of R/W repos is for its own network and another set of R/O repos are mirrors of the repos from the secured network; on the other box, the sets are reversed. Then provide no-brainer synchronization (either through gitolite's built-in mirroring support or via cron tasks etc) between matching sets of repos (say, each R/O repo mirror-fetches from its respective R/W repo). This way, each network would see an R/O view of another network. Each developer could fetch from the other network's repos but would only ever push to its own network's R/W repos. On the other hand, I fail to see what a setup that compilcated is called for. Is it possible to make a single machine available via SSH from both networks and hence have a single set of centralized repos? -- 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.
Re: [git-users] git fatal: The remote end hung up unexpectedly
On Tue, 27 Aug 2013 01:16:49 -0700 (PDT) Володимир Кулик cdrwvova1...@gmail.com wrote: parf@parf:~/work$ git push work FATAL: W any frontend.epass/parfymer parfymer DENIED by fallthru (or you mis-spelled the reponame) fatal: The remote end hung up unexpectedly I suspect you're confusing named remote repositories (or simply named remotes) which are objects in the configuration of your local Git repository with remote repositories existing on another machine which hosts them. Your local Git only ever accesses Git repositories on another machine using their URLs; user@host/path/to/the/repository is an example of such an URL (implying the SSH transport is used for communicating with that remote machine). Note that the URL you have used, gitolite@IP_ADDRESS, does not include any name of an actual repository on the remote host, so it has no sense at all. To get a better idea about this, read the GIT URLS section of the git-push manual page [1], and you will see that the path to the repository (on the remote machine) is not an optional part of an URL. That's why Git told you your URL did not look like a valid repository URL when you tried to use it in your `git remote add ...` call. Another thing you have to understand, that these named remote repositories (which are managed by the `git remote` command) is just a matter of convenience which 1) saves you from typing full URL each time you want to access a repository; 2) keeps bookmarks on the state of the branches of each named remote repository when you do `git fetch` on them -- in the form of the so-called remote branches (these origin/master etc). The final facet of this puzzle is that, it appears, Git repositories on your remote machines are managed by a special front-end tool called `gitolite` [2]. It might be set up in a number of different ways but *usually* it makes the repositories it hosts available without specifying actual pathnames to them in their approptiate URLs, that is, a repository foobar is usually accessed by the url like gitolite@hostname/foobar or gitolite@hostname/foobar.git. So, I'd try to go like this. First, inspect the list of named remotes you have by running `git remote` or `git remote -v`. If you have a remote named frontend.epass, call git remote set-url frontend.epass gitolite@hostname/frontend.epass to update the repository's URL. If you do not have this repository yet, call git remote add frontend.epass gitolite@hostname/frontend.epass 1. https://www.kernel.org/pub/software/scm/git/docs/git-push.html 2. https://github.com/sitaramc/gitolite -- 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.
Re: [git-users] git fatal: The remote end hung up unexpectedly
On Tue, 27 Aug 2013 14:26:09 +0400 Konstantin Khomoutov flatw...@users.sourceforge.net wrote: [...] Another thing you have to understand, that these named remote repositories (which are managed by the `git remote` command) is just a matter of convenience which 1) saves you from typing full URL each time you want to access a repository; 2) keeps bookmarks on the state of the branches of each named remote repository when you do `git fetch` on them -- in the form of the so-called remote branches (these origin/master etc). [...] I failed to mention that these named remote repositories (remotes, for short) are just snippets of configuration in your local Git repository. They contain an URL used to access the repository and some other bits of relevant data. The crucial thing about them is that the names of these remotes are completely arbitrary and have no relation at all to the names of remote repositories they describe. For instance, by default, when you do `git clone URL`, Git creates a single remote named origin, which predefined name usually has no resemblance with the name (URL) of the remote repository which has been cloned; rather it signifies that this remote is the origin of data maintained in the created local repository. From this follows, that: 1) When you adding a named remote, you have to give the `git remote add` command the URL of the repository, which necessarily includes its name, as understood by the remote machine (the server). 2) The name of the remote you're creating with `git remote add` is completely arbitrary and Git makes absolutely no connection between it and the name of the remote repository as recorded in its URL. So you're free to pick whatever name you pleases, including origin, if it does not yet exist. -- 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.
Re: [git-users] Keeping local config files
On Tue, 20 Aug 2013 07:43:09 -0700 (PDT) Smiley lyley...@gmail.com wrote: I have a repository on a server which is running along nicely. It houses a php project for reference. When I set up a local version I need to be able to keep certain files separate. My first thought is that I have a config file. In which is the root domain that the app is running from. On my live server this is something like dev.smiley.com but it needs to be localhost/dev on my local machine. How would I go about configuring this? The usual solution is to not keep configuration files in the repository at all but rather keep there their templates (like, say, config.php.template instead of config.php). Then at each deployment point -- your testing server being one of them and your workplace being another -- copy the templates to real configuration files and edit appropriately. You could possibly make this soultion a bit less tedious if your configuration files could be split into common (and less frequently changing) parts and site-specific parts -- you could then keep such common files in the repository and do something like require_once(site-local.php); in them, keeping *no* site-local.php in the repository but rather maintaining it as an untracked file at each site. Another possible approach is to use the so-called smudge/clean filters which re-write specific files upon checkout and commit but these are, IMO, are far more complicated to setup and maintain and appear to be an overengeneered solution to the problem as simple as yours. -- 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.
Re: [git-users] How do I remove a file from all branches in a git repository but leave it on the file system
On Mon, 19 Aug 2013 10:04:33 -0700 (PDT) joeriel...@gmail.com wrote: At some point I added a large file into a git repository. It now exists on multiple branches, possibly with some changes to it. I'd like to remove it from git, but leave its current form (say the one on the master branch) on the file system. I tried (on a dummy git archive) git filter-branch --index-filter 'git rm --cached --ignore-unmatch bigfile' master branch1 branch2 That, however, does not leave a copy of bigfile on the file system. It isn't clear to me why not, though the description of the --tree-filter option to filter-branch (I'm using the --index-filter option, but is is similar) states: (new files are auto-added, disappeared files are auto-removed ... ). Is there a direct way to do what I want, with git? I've found similar requests; none of the responses point out that the above command actually deletes the file from the file system. I'm with Dale on this issue, but why do you consistently mention file system? If you want `git filter-branch` to keep your file on your file system, just copy it yourself from the project's work tree somewhere else, and after filtering your branches, move it back to the work tree, then make it a part of a commit on the relevant branch. What's the problem? If you wonder why the file disappears from the work tree during the filtering process, my take on it is that 1) the work tree is used as a scratch space during the filtering, and 2) the work tree (normally) contains the same state HEAD does, so if filtering deleted the file from HEAD it's logical the work tree does not contain it as well. -- 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.
Re: [git-users] Git Delete File Mode
On Mon, 5 Aug 2013 22:49:17 -0700 (PDT) Balaji balajis.sh...@gmail.com wrote: Pleasure contacting you. Recently, all the git commit deletes the the staged changes. I even install new server and desktop versions to test but all in vain. Please help us as soon as possible. git commit receives deleted file mode 100644 It's hard to make out what are you asking about... Do you mean you're attempting to commit a file with some funky permission bits (like 4757), and it's being added in the repository (and then subsequently checked out) with its permission bits reset to 0644? If so, then with plain Git you're out of luck as Git only stores the execution bit. Please do a bit of research [1] for the relevant discussions and approaches to managing file permissions with Git. In my opinion, the simplest approach is to provide a special (shell) script which would properly set file permissions up. Note that `git checkout` is *not* a deployment tool. If you need deployment, write and maintain a special deployment script which would take care of it. 1. https://www.google.com/search?q=Git+file+permissions -- 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.
Re: [git-users] Re: post-receive not able to execute git checkout
On Mon, 29 Jul 2013 03:50:56 -0700 (PDT) Andreas Dvorak andreas.dvo...@googlemail.com wrote: Hi Krishna, unfortunately that did not help. The output is the same. DATE_STAMP=$(date +%Y%m%d%H%M) LOG=/var/tmp/git.log echo checkout $DATE_STAMP $LOG cd /var/tmp/test2_clone GIT_TRACE=1 git fetch origin ^^^ There has been `git checkout *` in your original message; what's the matter with this change? git push Enter passphrase for key '/home/user1/.ssh/id_rsa': Counting objects: 5, done. Delta compression using up to 32 threads. Compressing objects: 100% (2/2), done. Writing objects: 100% (3/3), 293 bytes, done. Total 3 (delta 0), reused 0 (delta 0) remote: fatal: Not a git repository: '.' My take on this is that when server-side Git process executes your hook it sets several environment variables which affect the execution of the hook script; when you run `git checkout` (or whatever else), there's no such variables. These variables are explained in [1], and the easiest way to see what they are is to add something like set /tmp/hook.envvars at the beginning of your hook script then perform push to trigger the hook and examine the generated file. And by the way, doing `git checkout *` in your script might not do what you really mean: the asterisk will be expanded by the shell to the list of files in the current directory, not passed to the `git checkout` command as is to be interpreted by Git, so supposedly you want to protect that character from being expanded by the shell. 1. https://www.kernel.org/pub/software/scm/git/docs/git.html P.S. Instead of reinventing the wheel (what you appear to be doing) I'd just google for git+web+deploy and study ready-made solutions. Beleive me, while Git developers are tireless in explaining that Git is not a deployment tool, every second web developer disagrees and embarks on exactly this task. StackOverflow receives at least one question per day asking about how to do web deployment with Git, so you're definitely not the first, and the internets are abundant with information on how to do this with various degrees of lameness, so I'd do some recearch and try out various solutions. -- 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.
Re: [git-users] Re: post-receive not able to execute git checkout
On Mon, 29 Jul 2013 06:06:32 -0700 (PDT) Andreas Dvorak andreas.dvo...@googlemail.com wrote: I found the solution. With env -i to unset the environment the git command does work #!/bin/sh DATE_STAMP=$(date +%Y%m%d%H%M) LOG=/var/tmp/git.log echo checkout $DATE_STAMP $LOG cd /var/tmp/test2_clone env -i git fetch origin env -i git reset --hard origin/master env -i git clean -f -d The probem here is that you have no idea why this fixed your problem. Please try to understand why happens using the approach I proposed in my other mail and invent a proper (read: thought-out) fix to your problem. -- 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.
Re: [git-users] Re: post-receive not able to execute git checkout
On Mon, 29 Jul 2013 11:22:38 -0400 wor...@alum.mit.edu (Dale R. Worley) wrote: [...] I don't know the official specification (and it's not likely to have been written down anywhere), but it is possible that the directory for remote operations *must* be a *bare* repository. [...] To my knowledge, the only restriction Git has on remote (in the sense we're considering there) repositories, is that it's not possible to update a branch in them which is currently checked out (to not make HEAD different from the index and the work tree in a drastic way). And Git produces a meaningful and lengthy error message when this condition is hit by the sending side. Moreover, the OP had proved the different environments hypothesis by getting expected results when running each call to Git in their hook wrapped in a call to `env -i`. -- 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.
Re: [git-users] ERROR: Error (256) while running 'git checkout -q 'branch1'
On Mon, 29 Jul 2013 07:33:41 -0700 (PDT) Ling oylf1...@gmail.com wrote: When I try to checkout the different branch and I got below errros: error: Your local changes to the following files would be overwritten by checkout: . how do I get this working so I can switch branches? Let's cite the manual: git checkout branch To prepare for working on branch, switch to it by updating the index and the files in the working tree, and by pointing HEAD at the branch. Local modifications to the files in the working tree are kept, so that they can be committed to the branch. and then -m --merge When switching branches, if you have local modifications to one or more files that are different between the current branch and the branch to which you are switching, the command refuses to switch branches in order to preserve your modifications in context. However, with this option, a three-way merge between the current branch, your working tree contents, and the new branch is done, and you will be on the new branch. So, Git refuses to check out your branch because it can't reconcile the prospective changes to certain files the new branch is about to bring in with the local uncommitted changes you have in your work tree (and possibly in the index). Now you have several options. Which option to pick depends on what outcome of your prospective actions is desired, and you did not tell us about this. The options are: 1) Commit your changes. This will let the checkout operation to proceed by just replacing the files in the index and the work tree with their contents as recorded in the tip commit of the branch to be checked out, as usually. 2) Stash your changes. This will make your local changes to disappear from the work tree and the index, again, letting the branch switching to proceed. You will then have to decide what to do with these stashed changes. 2a) Stash your changes, check out another branch then unstash the changes. This operation is guaranteed to result in merge conflicts with which you will have to deal. 3) Use `git checkout --merge branch` and deal with merge conflicts right away. These will be somewhat reversed to those which would occur should you pick (2a) because the order of application of the actual textual changes will be reversed. But essentially these will be the same conflicts (touching the same parts of the same files). -- 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.
Re: [git-users] fatel error
On Tue, 23 Jul 2013 23:33:31 -0700 (PDT) Nidhi Arora nidhi.aro...@gmail.com wrote: when i use $ git clone git://git.kernel.org/pub/scm/git/git.git then fatal error is come: unable to connect to git kernel.org(port 9418)(no such is know.) help me.. The git:// protocol uses TCP to connect to port 9418 on the remote host (git.kernel.org), so to verify it's not a Git's fault but a general network problem, try doing telnet git.kernel.org 9418 in your command shell. If it errors out with a similar message, then you most probably have outgoing connections to TCP/9418 disabled by your network setup (possibly denied by a firewall somewhere). Solving this issue has nothing to do with Git, but first I'd try HTTP transport: git clone http://git.kernel.org/pub/scm/git/git.git Traffic coming to port TCP/80 used by HTTP has much higher chances to be let through by firewalls, and it's supported by git.kernel.org. -- 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.
Re: [git-users] Re: how merge a branch in an empty head
On Wed, 24 Jul 2013 03:08:07 -0700 (PDT) 杨沐 azur...@gmail.com wrote: I do the same thing which u told me , but it doesn't work , please see the picture below: https://lh5.googleusercontent.com/-e-d0oW69PLE/Ue-ngBABkhI/ACo/zKRuTvaU7oA/s1600/%E5%B1%8F%E5%B9%95%E5%BF%AB%E7%85%A7+2013-07-24+%E4%B8%8B%E5%8D%886.07.28.png Hi! Could you please just copy and paste plain text? This is way easier to read and it's possible to quote and comment parts of it. This document [1] details how to do that. 1. http://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/windows_dos_copy.mspx -- 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.
Re: [git-users] git-svn doesn't see updates that it fetched, and says nothing to rebase
On Mon, 22 Jul 2013 13:53:45 -0700 (PDT) Brian Dukes dukes.br...@gmail.com wrote: [...] It now tells me that masteris up to date, but it hasn't applied any of the new commits from SVN. Calling git svn fetch now completes in a few seconds. So, it seems somewhere git svn thinks that it has the commits and has applied them, but it hasn't. [...] I'm not familiar with git-svn on this scale, but consider doing two things: * Look into tip commits of branches of interest: each commit git-svn records contains an additional field, Git-Svn-Id, in its message, which binds this commit to its counterpart in the paired Subversion repo. This might provide some hint for you. * Look into .git/config as git-svn stores certain specific setup information there. -- 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.
Re: [git-users] Re: how to ?
On Fri, 19 Jul 2013 23:31:04 -0700 (PDT) Syaifull Al-Bandary ritnes...@gmail.com wrote: thank you, your answer. I would probably ask for a lot of time to come. we need your clarification on git, to make us understand. please, continue the explanation. [...] I'm not sure what do you mean -- I tried to explain that your question as it was asked had little sense as it was too broad, and tried to explain why. Now please understand that Internet is abundant with the HOWTOs, blog posts etc dealing with deploying server-side Git catered for specific scenarios. So please don't ask me to do the necessary research for you -- do it yourself. Possibly you should start from familarizing yourself with Git by starting with documents and books mentioned at [1]. Also don't forget that there are commercial turn-key Git hosting providers which will enable your team to host private repositories with zero effort on your part -- Github, Bitbucket, Assembla, to name a few. I suspect you do not currently possess the necessary skills to undertake the task of professionally hosting server-side Git yourself so I'd look at commercial solutions. 1. http://git-scm.com/documentation -- 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.
Re: [git-users] how to ?
On Fri, 19 Jul 2013 02:22:08 -0700 (PDT) Syaifull Al-Bandary ritnes...@gmail.com wrote: how the stages to build git server using ubuntu server? This question is impossible to answer sensibly: you can just do # apt-get install git and be able to work with any repositories on that Ubuntu server via SSH. But this might wish not to stop at this because: * You might want to have virtual Git users instead of creating a real system account for every developer wanting to access your server -- this requires setting up a special tool like gitolite. * You might want to serve your repositories via the read-only git:// protocol -- this requires installing and setting up git-daemon. * You might want to make your repos accessible via HTTP -- this requires setting up a web server and tweaking it accordingly. * You might want to have a turn-key integrated solution to manage everything related to Git -- this requires deploying of a specialized program suite. ... etc etc etc. -- 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.
Re: [git-users] Question about Git and Users
On Fri, 19 Jul 2013 04:37:59 -0700 (PDT) Juan Carlos Rodríguez juanca...@gmail.com wrote: [...] Project p_example /scripts /src /docs Users: A, B and C Only B and C can access into scripts, src and docs folders but A only can access into scripts folder. Impossible with Git. And you have a mindset not matching that of required to use Git sensbibly. First, note that you're talking about some sort of central repository without even mentioning that fact. But Git is not a centralized system -- quite contrary, it's a distributed system where each developer has its *own* repository and has total control over its contents. I mean, whatever imaginary restrictions you would like to set up (we'll return to them shortly), they have no meaning at all in the repositories in which actual developers do their actual work. Second, Git does not track directories. This might sound weird (to someone coming from, say, Subversion) but it's true nevertheless -- the fact Git knows something about directories does not imply it actually pays any attention to them; Git indeed has the concept of trees, which resembles directories, in its repository format, but this is just a byproduct of the fact filesystems on popular OSes Git runs on are also hierarchical. When you rename a file or directory in a Git repository, and commit this change, no information is recorded to explicitly mention this fact; to give you an example, the `git mv` command which renames a file (possibly across directories) is just a shortcut for delete and untrack the file then move it physically in the work tree then start tracking it at its new location. Now let's get back to your centralized workflow. I infer from your question that you have one central (master, blessed, reference or whatever) repository everyone clones from and pushes to, and you want fine-grained control over who pushes what. Now, since Git supports so-called hooks -- scripts which run at key moments of the repository updates, including pushes -- you're in theory are able to write a post-receive hook which would traverse over each of the updated refs (branches, tags etc), then for each ref traverse the new line of commits that ref points to, and inspect it to see if the commit touches any paths you want / do not want, and fail the hook, if needed, to make the whole operation abort. You can see that this is doable but hard to get right. Now let's try to reconsider your approach to this problem. The Git way in a case like this is just to not let every single developer to commit to that reference repo. Instead, have one or two designated integrators who will be responsible for taking changes from individual developers, *verify these changes* and, if they are okay, integrate them and push the resulting commit(s) to the main repo. If needed, your individual developers might have their own central repositories, serving as backups of their local ones and/or for means of easier visibility of the stuff those developers are working on. Or each developer might have their personal set of branches in the single central repository. The de-facto standard tool to implement per-repository and per-branch read/write (or more fine-grained) access for the case of accessing the server via SSH with virtual Git users is gitolite [1]. This tool also makes possible to have per-developer repositories (it calls them wild repositories). The proposed workflow is like this: * Each individual developer either * Has their local repo accessible directly from their workstation (it's not hard to implement, really, -- one should stop thinking that VCS requires a server to operate) or * Has their personal central mirror for their local repository. * has their personal set of branches in the single central repository. In either case each developer either works in their local repo, and integrators pull from it, or they occasionally push their work either to their personal central mirror or use their personal branches in a central repo; in this case the integrators pull their work from there. * Integrators do actual integration and update the central repo. No one except those folks is able to commit there, only fetch. Of course, this approach requires certain mind bending. Linus Torvalds gave a good and lengthy explanations of this alternative mindset while helping KDE folks migrate from their CVCS to Git [2]. 1. https://github.com/sitaramc/gitolite 2. http://lwn.net/Articles/246381/ -- 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.
Re: [git-users] Question about Git and Users
On Fri, 19 Jul 2013 08:20:27 -0500 John McKown john.archie.mck...@gmail.com wrote: [...] In order to limit access to one or more directories (folders) or files, you must use the facilities with the host operating system. Because you said folder instead of directory, I assume that you are running Windows. I don't _do_ Windows grin/. On a real OS, like UNIX or Linux, you can use Access Control Lists (ACLs) to enforce limits on a user's abilities. I would hope that Windows has something similar. [...] Oh, come on! I admire your contribution to this list, but please quit spreading FUD *in this particular case:* everyone long forgot Windows 9x and FAT, and every sensible Windows flavor (I mean those OSes based on the NT kernel and its modifications) require their system partition to be on NTFS which has full support for ACLs by design, and these ACLs do actually work. Yes, ACLs are complicated, and yes, stock Windows' and 3rd-party software tend to have an unfortunate property of not paying much attention to security (services (think of daemons) usually run under the LOCAL SYSTEM account (think of root), and there's often little to no separation between the place containing the program code/data and the stuff program writes itself (think of /usr/bin + /usr/sbin vs /var/lib + /var/spool separation as per FHS) but this is no excuse for blindly bashing Windows. Also I'm quite sure you know that reasonably few people use POSIX ACLs -- they are not even enabled in default mount options for most filesystems (in Linux, I have little experience with BSDs and more exotic stuff -- they might have other defaults of implementations of ACLs). -- 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.
Re: [git-users] where is stored the staging area(index) on our machines
On Thu, 18 Jul 2013 10:44:05 -0500 John McKown john.archie.mck...@gmail.com wrote: It should be noted that the index file has a complicated not-human-readable binary format, and is not for direct intervention by the user. It should be treated as a completely opaque data and manipulated by the Git tools exclusively. The staging area is also called the git index. This is probably better than I am at explaining: http://stackoverflow.com/questions/4084921/what-does-the-git-index-exactly-contain but basically the index is in the .git/index directory. Normally this is in the working directory of the project. But you can specify a different location using various GIT_ prefixed environment variables. [...] I wonder where is stored that staging area on our machines? Is it in /tmp? -- 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.
Re: [git-users] windows 7 - explorer integration context menu missing
On Tue, 16 Jul 2013 19:07:47 -0700 (PDT) Yancy Boncato rlyn...@gmail.com wrote: Thanks for the link. This is the same problem as this thread. https://groups.google.com/forum/#!topic/msysgit/PHE1V3L1UY4 Im using Windows 7, 64bit Msysgit - Git-1.8.3 - no explorer, context menu Msysgit -Git-1.8.1.2 is ok Judging from the commit referred to from the post describing your problem [1] this issue is OS-agnostic, and the fix for it will supposedly be included into the next preview binary package. 1. https://github.com/msysgit/Git-Cheetah/commit/c8dc8456 -- 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.
Re: [git-users] windows 7 - explorer integration context menu missing
On Tue, 16 Jul 2013 00:12:11 -0700 (PDT) Yancy Boncato rlyn...@gmail.com wrote: Git release ver Git-1.8.1.3 - advance context menu is somehow disabled. Git-1.8.1.2 is working correctly Please ask this question on the relevant mailing list [1]. Please also be sure to search that list for questions like yours before asking. This list (git-users) is for helping users use the tool, not for reporting bugs in it or in a particular port of it. 1. http://groups.google.com/group/msysgit/ -- 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.
Re: [git-users] windows 7 - explorer integration context menu missing
On Tue, 16 Jul 2013 00:12:11 -0700 (PDT) Yancy Boncato rlyn...@gmail.com wrote: Git release ver Git-1.8.1.3 - advance context menu is somehow disabled. Git-1.8.1.2 is working correctly A quick followup: please also be sure to at least tell if you're using 64-bit or 32-bit OS. The more information you provide, the better. -- 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.
Re: [git-users] git users and permissions
On Mon, 15 Jul 2013 21:01:10 -0700 (PDT) HWSWMAN ed.pat...@gmail.com wrote: i created a repo on a server, and i followed instructions to make a new git group, and assign users to the group .. then i set it so the shell is git shell, and the users can only access the files through git .. this is great .. now, can i create a user that can only pull? that would be great There's no way to do implement this using plain Git. Either look at specialized server-side front-ends like gitolite [1] or at turn-key Git hosting solutions like [2] or [3]. 1. https://github.com/sitaramc/gitolite 2. http://gitblit.com/ 3. http://gitlab.org/ -- 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.
Re: [git-users] git users and permissions
On Tue, 16 Jul 2013 10:30:48 -0400 wor...@alum.mit.edu (Dale R. Worley) wrote: now, can i create a user that can only pull? that would be great There's no way to do implement this using plain Git. If a user can only *read* the files in the Git repository, what can the user do with the repostiory using Git? May be you're right but may be not -- if Git sets up some king of lock on the repository to have the consistent view of it while calculating the set of objects to transfer to the remote side, then fetching won't work. I don't know if Git does that and I'm lazy to check. I admit I had a knee-jerk reaction to the OP's question: if one asks for fine-grained access control to Git repos my immediate reaction is to tell that person to look for a specialized solution. For instance, gitolite work OK for what I have at my $dayjob. But you made me look at this problem from a different angle: if this fits the OP's task, he could just set up a git-daemon instance to provide read-only access to his repositories. The obvious downside is that this method does not provide authorization control as all the access is anonymous. -- 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.
Re: [git-users] Problem in rebasing
On Mon, 15 Jul 2013 04:17:36 -0700 (PDT) Amit Kumar amit3...@gmail.com wrote: [...] I have made many commits but now i need to do rebase and when i do rebase it says current branch is already updated. How exactly do you do rebasing? Looks you're trying to rebase onto an origin branch which were not updated since you forked your feature branch off it, so there's no need for rebasing. My work flow is like i clone a project from git and start working on its branch. 1. First commit 2. Second commit 3. Third commit 4. fourth commit 5. Fifth commit But now i want to rebase and want to merge the first and last commit and remove the all middle commits. You chose bad wording to it's not exactly clear what you really want to achieve. Do you want to prettify your development history (so that the *changes* commits 2 through 4 introduce are kept but there are no records of these separate commits in the history) or do you want to completely evaporate the changes they introduce and just transfer the changes made by the commits 1 and 5 from your development branch to some other branch? Or do you want to rebase your development branch onto some other branch (its origin branch may be) but keep only commits 1 and 5 as the result of rebasing? If yes, should the changes made by commits 2-4 be kept or not? Please be way more specific. -- 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.
Re: [git-users] Problem in rebasing
On Mon, 15 Jul 2013 05:09:43 -0700 (PDT) Amit Kumar amit3...@gmail.com wrote: A. Because it breaks the discussion flow. Q. Why top-posting sucks? I m working on the the branch ABC say and I want changes made by the commits 1 and 5 from ABC and remove the 2,3 4. Then do interactive rebasing. Say, if your branch ABC was forked off branch master, do $ git checkout ABC $ git rebase -i master At this point Git will create a so-called rebase script for you and open it in your preferred text editor. This script will contain one entry for each of your five commits made at ABC on top of master. Now just delete from it the entries for commits 2-4, save and quit the editor -- git will pick just the first and the last commits while rebasing, exactly as you will have specified in the rebase script. [...] -- 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.
Re: [git-users] How to show the commit history of a file
On Thu, 11 Jul 2013 03:24:53 -0700 (PDT) Akira Tsuchiya akira...@gmail.com wrote: I want to retrieve the commit history of a given file. What command should I issue? I expect the command like below. D:\GitTest git show --commit-history test.txt 8194aaa c419234 ... git log --follow --format=%H test.txt As Git does not explicitly track renaming and copying of files, you might want to read up the `git log` manual on the --find-renames, --find-copies and --find-copies-harder command-line options, if you find the defaults for Git's heuristics of sensing file's lifetime are not sufficient to uncover the file's past life. -- 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.
Re: [git-users] Re: Truncate complete history
On Wed, 10 Jul 2013 02:43:04 -0700 (PDT) ironm4nc...@gmail.com wrote: I already tried the BFG Repo Cleaner, but while running it craches with this Exception : org.eclipse.jgit.errors.LargeObjectException$ExceedsLimit:. It looks like one commit is bigger than the 5 mb cache limit. Please consider bringing this issue up either in the project's bugtracker on github or on the main Git mailing list (git at vger.kernel.org, see [1]) as the tool's author reads it. 1. http://vger.kernel.org/vger-lists.html#git -- 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.
Re: [git-users] bash SHA-1 completion
On Tue, 9 Jul 2013 11:23:13 -0400 wor...@alum.mit.edu (Dale R. Worley) wrote: [...] I suspect the reason that hash completion hasn't been done yet is more that it isn't very useful. If you type 8d40fc and auto-completion offers 8d40fc7e56eeb9ea725054822de5c8c145a65c 8d40fc088ee0223992617c6e45f0bae7915161 8d40fc0263d7cfc32017fdbf8cb9101613ab9c that won't prompt your memory, Ah, yes, 8d40fc088ee0223992617c6e45f0bae7915161 is the one I was looking for! In most modern systems, you use a hash only when you copy it from somewhere else, and there usually is a cut-and-paste functionality that allows you to do that. I think that cut-and-paste is what the OP would like to stop dealing with -- I, too, find it not very convenient to have to reach for the mouse to copy a SHA-1 name from a `git log` output which I, say, would like to run a rebasing operation on. Being able to tab-complete on SHA-1 names would require me just to memorize 2-3 leading digits from that name, type them and hit my completion key one or two times to be reassured I remembered correctly. Not that I desperately need a feature like this though... -- 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.
Re: [git-users] bash SHA-1 completion
On Mon, 8 Jul 2013 11:41:09 -0700 (PDT) Andy From andyf...@gmail.com wrote: I wonder if there's been any work on providing SHA-1 tab completion for any command (e.g. show or diff) ? Completion works fine for e.g. branches but it might be a convenience feature to also be able to complete on SHA-1. Maybe there would be some performance drawbacks on this and there's been some discussion on this already... A question like this should be directed to the main Git list (git at vger.kernel.org, see [1]) which is dedicated to discussing of the Git development. But really let's just look at the problem: there's no single registry of object names which would facilitate their quick lookups. So full support of SHA-1 completions appears to be infeasible to implement. On the other hand, the completion function could run `git for-each-ref ...` and try to complete through the list of returned SHA-1 names of those references. That would only include SHA-1 names of all the branches, tags, notes etc but supposedly that would be okay for most practical uses. 1. http://vger.kernel.org/vger-lists.html#git -- 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.
Re: [git-users] Created yet another git tutorial
On Sun, 7 Jul 2013 16:30:39 -0700 (PDT) Scott Danzig sdan...@gmail.com wrote: I was just going to outline my typical workflow with Git, but I tend to want to make sure the reader understands what I talk about, and figure, even if there are a million things on the internet, it might be my way of explaining it that someone groks. I ended up adding a massive Git tutorial section. Not comprehensive, but enough to get someone going. Wondering if anyone here wants to have a look at it and let me know if you think it was worthwhile or not? :) http://sdanzig.blogspot.com/2013/07/introduction-to-git-along-with-sensible.html One minor nitpick: the official (in the sense of being required for commits to the Git (and Linux) projects themselves) stance on writing commit messages is that the first (or the only) line of a commit message should use imperative mood, like Add feature A vs Added feature A. I think it would be cool to promote this usage in the tutorial as well, but I think implementing this at this point would require reworking many screenshots... -- 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.
Re: [git-users] How to show commit file type attached to a hash code
On Mon, 8 Jul 2013 02:43:28 -0700 (PDT) Akira Tsuchiya akira...@gmail.com wrote: I want to show commit related information by the command below. By this, committed files are shown, but names only, off course. But in addition to this, I want to show commit file types (New, Edited, and Deleted). What argument should I use in the command? git --no-pager show hash code --format=%h%n%an%n%ai%n%s --name-only Use --name-status instead of --name-only ? -- 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.
Re: [git-users] Re: Question on git command output pause
On Sun, 7 Jul 2013 04:42:51 -0700 (PDT) Akira Tsuchiya akira...@gmail.com wrote: I enter the git command below and get the output. git show commit has When the output length is too big, the command output pauses and waits for the user’s input of [Enter]. But I want to get the output without any pauses. For that purpose, which argument should I add to the command? [...] git --no-pager cmd will skip the pager. You can also configure the default action to no page (for specific commands). See https://www.kernel.org/pub/software/scm/git/docs/git-config.html - search for pager. Quote: pager.cmd If the value is boolean, turns on or off pagination of the output of a particular git subcommand when writing to a tty. Otherwise, turns on pagination for the subcommand using the pager specified by the value of pager.cmd. If --paginate or --no-pager is specified on the command line, it takes precedence over this option. To disable pagination for all commands, set core.pager or GIT_PAGER to cat. Thank you very much. Note that Git only spawns the pager if it sees the output is about to be sent to an interactive terminal, so if you're worried about scripts (like piping the output of a Git program call to another program) then stop worrying -- Git will figure out no pager is needed without any explicit command-line switches. -- 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.
Re: [git-users] How To Connect To Remote Server FTP?
On Mon, 8 Jul 2013 05:09:33 -0700 (PDT) Charles Wilmott joomlaphotographytempla...@gmail.com wrote: How do you connect to Remote Server please? Git does not support FTP for accessing remote repositories. If, on the other hand, you'd like to use Git to assist you with *deployment* of your code (looks like you're doing web development), then take a look at git-ftp [1] -- this tool is able to synchronize a directory on a FTP-server with your Git repository. It's able to perform minimal transfers (upload only those files which were changed since the last synchronization session) and remove files/directories which were removed in the repository. 1. https://github.com/git-ftp/git-ftp -- 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.
Re: [git-users] GIT Pre-push hook error
On Mon, 8 Jul 2013 08:49:15 -0700 (PDT) mkjkec2...@gmail.com wrote: i am trying to write a pre-push git hook to check the validity of a JIRA issue in perl . pre-push perl script executes fine and i get a desired output when the perl script is executed through the windows command prompt . However , executing git command git push origin master to invoke the pre-push hook results in an error illegal division by zero in warnings.pm . Any clue on the behavioral difference when the script is executed via windows command prompt versus when invoked by GIT push command . Supposedly, when a hook script is executed by Git, it's being run using a port of a POSIX shell, bash, and not Windows shell (cmd.exe) -- hence I imagine there might be behavioral differences: * Different environment. * Git comes with its of minimal Perl installation, so if you have another one installed (like ActiveState Perl or Strawberry Perl etc), the latter might be picked when you perform your trial runs while the former is used by Git when running your hook. * Push hooks run with the same credentials Git process serving the push operation is using; these might well be different from those you're logged in with while developing. Where to go from there -- try to re-create as close an environment to that seen by your hook when it's being spawned by Git: * Do your trial runs using Perl which comes with Git itself * Do that in that Git bash window (accessible via the Git's Windows Start Menu entry) rather than in cmd.exe. * Run Git bash with the same credentials used by your Git server process. If it runs with the LOCAL SYSTEM credentials, one trick to get the shell with appropriate credentials is to run `psexec -s ...` (available as part of the Sysinternals package). -- 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.
Re: [git-users] Reg: Getting new branch commits in git
On Tue, 2 Jul 2013 07:51:18 -0700 (PDT) Muthu n.petchimu...@gmail.com wrote: Hi, I'm a new one for git. I need to execute some code standards in my server (git repository). But i'm unable to execute the codecheck process for the new branch commits pushed by client. Its working for the existing branch. I'm using update hook for executing this codecheck process. old-sha1 value for the new branch is So, I got the below mentioned error. fatal: Invalid revision range .. Kindly help me how to proceed this one. pre/post-receive hooks in Git receive one or more lines on their standard input, each consisting of a reference name to be updated, the SHA-1 name of the previous commit it pointed to, *if any,* and the SHA-1 name of the current commit the ref should be made point to. Obviously, if there's no previous commit, the matching SHA-1 will be bogus. The manual page [1] explicitly says that for new refs this value is 40 ASCII characters of decimal zero: When creating a new ref, old-value is 40 0.. Hence your pre/post-receive hook should just check if it sees such an all-zeroes old SHA-1 value and act accordingly -- for a start, do not try to use it in a revision range as you're doing now. 1. https://www.kernel.org/pub/software/scm/git/docs/githooks.html -- 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.
Re: [git-users] GIT for aix
On Mon, 1 Jul 2013 08:46:43 -0700 (PDT) mithun naidu mithun.na...@gmail.com wrote: There was a request to install GIT on aix servers but there are no documentation or softwares to install GIT on aix. Can you please share any documentation and softwares available to install GIT on aix. Uh... Plain googling [1] turned up [2] as the first result. Did following that path fail for you? 1. https://www.google.com/search?q=Git+AIX; 2. http://www.perzl.org/aix/index.php?n=Main.Git -- 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.
Re: [git-users] portable git?
On Wed, 26 Jun 2013 13:00:13 -0700 (PDT) supertol felixo...@gmail.com wrote: Is there any version of git that works as a standalone executable file (can still depend on libraries, ofc). Means, i'd be lookinf for a git.exe (+ dependencies) that i can just drop to a folder and use to initialize a repo in that folder, without having git installed and without git somehow 'polluting' the system. A true standalone command line tool. It *seems* to work when i copy the entire git/bin folder over. Can anyone confirm this works, or does that have side effects? It's a bit complicated: 1) There's a single top-level Git binary, which is simply called `git`, and which is responsible for handling individual commands (like `git push`) either by itself or by dispatching them to other programs. 2) Now there's a handful of legacy `git-whatever` programs, most of which are symlinks to that top-level `git` binary. They are there to not break existing scripts which rely on their presence. 3) Some bits of Git functionality are implemented not by the main program but other programs. Notable examples are `git rebase`, `git submodule` and `git svn`. On my Debian system I could do $ vdir /usr/lib/git-core/ and just look at which entries are symlinks and which are regular files to get the idea. 4) While most of Git is implemented in C, some bits of it are implemented in POSIX shell (`git rebase` is a notable example), and others are implemented in Perl (`git svn` is a notable example). While the shell scripts are usually self-contained, `git svn` depends on the presence of a rather extensive Perl library to interact with Subversion servers; for this reason Git for Windows even bundles this whole stuff. So, in the end: * No, there's no single executable. * Mere copying the main Git binary could work for some fair percent of Git functionality -- unless you call a Git command using the legacy `git-whatever` convention or attempt to call something not implemented by the main Git binary itself, for instance, `git rebase`. * Everything implemented in Perl will be out of the game, for the same reason. Another thing to consider is that Git does not makes any promises about how exactly various commands it supports are implemented: for instance, some day `git rebase` might be re-implemeted using C and hence will be supported directly by the main Git binary. If you really need a self-contained executable, consider looking at Fossil [1] -- it (in my eyes) is inferiour to Git feature-wise, but its binaries are routinely dependent only on libc, libz (but it could be compiled in statically) and libssl if you want SSL support. And it's self-serving, including an extensive built-in web UI. I'm using it in several places and for simple things it works bearable, especially if you're not too much into command-line stuff (I am, so that's why bearable and not wonderful) ;-) 1. http://www.fossil-scm.org/ -- 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.
Re: [git-users] Merging hotfix without merging all files.
On Wed, 26 Jun 2013 11:18:58 +0530 Shouvik cance...@gmail.com wrote: Yes, pass the --no-commit option to `git merge` and it won't automatically record a merge commit but will rather leave the changes staged in the index. Then you'll be able to unstage the changes made to index.php by running $ git reset index.php After that, commit as usually. [...] Ok so please confirm if the following steps are okay (assuming that currently I am in *bugfix* branch) No, one crucial step is missing -- see below. git commit -m major bug fixing register.php login.php index.php git checkout master git merge --no-commit bugfix Notice that here we explicitly told Git to *not* record a merge commit, just leave in the index (and the work tree) whatever changes the merge operation did to them. git reset index.php At this point run `git status`, `git diff --cached` and confirm for yourself you're okay with the changes about to be committed. This is a good habit you're really advised to develop -- do not ever commit blindly (unless you're absolutely sure). git push origin master Too early: you have not committed the changes introduced by the merge operation yet! Hence there's supposedly nothing to push. Now please scroll back to the quote from my original message above, which reads After that, commit as usually... Note that this case is really not rocket science. For some reason, you appear to perceive it as some sort of black magic which it really isn't: 1) Any merge operation which does not resolve in fast-forwarding the receiving branch, -- and this only ever happens if the branch being merged (the other side) completely contains the receiving branch in its history, so there's no point in attempting a true merge -- results in a new commit which a) records all the changes introduced by the merge, and b) refers to all the branches which participated in merging. 2) Since you want to tweak the result of the merge operation (drop the changes which it does to one file) you explicitly tell Git to not auto-commit the result. Consequently, you have to commit the (tweaked) state by hand. Please, don't try to *memorize* what to do, try hard to understand *what* each of the steps does, and why -- you have all the information. If you feel lost with what `git merge`, `git reset` and `git commit` do, it's time to read the book and study other pointers (like that article on `git reset` I linked to in my first reply to this thread). -- 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.
Re: [git-users] Applying patch to Drupal module
On Tue, 25 Jun 2013 06:10:11 -0700 (PDT) Ben Alcantara ben.alcant...@gmail.com wrote: I'm using terminal but i've gone to the directory via the ftp command. How would I apply this patch via SSH, is it similar commands like FTP? OK, I'm glad you decided to answer at least some of my questions. No, FTP is not just a continuation of your shell -- while the interface of a typical stock FTP client resembles that of the shell, it's not the shell, and in particular FTP does not support execution of commands. You basically have two options: 1) Install Git on the server. Log into the server using SSH and hence get a *real* shell on the server. Then you'll be able to execute any commands on the server (since you'll have a shell there). This options obviously requires SSH access to the server. And an administrator to install Git in it. 2) Somehow export a directory containing your repository either using a networking filesystem (NFS, SMB/CIFS or whatever) then mount it locally and work with the mounted directory using a local Git installation. If your local system is Linux-based you can mount a directory containing your Git repository onto your local system using SSHFS [1]. An upside of this is that it only requires SSH on the server. Another, different, approach is to quit using Git on the server either way and only perform deployment of a code which is ready to be deployed. I mean, no fixups or Drupal module patching or whatnot is ever performed directly on the server -- everything is done on a developer/sandbox workstation, committed and then deployed on the server using a tool like git-ftp [2] or rsync. 1. http://fuse.sourceforge.net/sshfs.html 2. https://github.com/git-ftp/git-ftp -- 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.
Re: [git-users] Help on move the git repo directory from /opt/git to /passdev/git on unix server
On Tue, 25 Jun 2013 11:26:53 -0400 lingfei ouyang oylf1...@gmail.com wrote: Just another quick question? Since after we move the git repo folders, how I can check if the git is running correctly? Uh... Clone the moved repo from a client? -- 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.
Re: [git-users] Applying patch to Drupal module
On Mon, 24 Jun 2013 04:52:21 -0700 (PDT) Ben Alcantara ben.alcant...@gmail.com wrote: I'm new to using Git and I'm a little confused. I'm trying to patch a module and I've gone to terminal and gone to the folder I need to patch via FTP. Do I understand correctly, that you're using some FTP client and gone to the folder in this context means you used that FTP client to navigate to the remote directory containing the file to patch? I've been following this tutorial http://www.youtube.com/watch?v=i-oe7_qHreY Please try to explain this in plain English: it's not really appropriate to ask people to spend their time watching random videos to help you solve your problem. but whenever I add the apply git command I get 'invalid command'. What's the precise command you're trying to run and what's the precise error message it generates? Please do plain copying and pasting. Does Git only apply patches locally? What am I dong wrong? Your question contains too little information to try to answer. Running `git foo` tells me git: 'foo' is not a git command. See 'git --help'. Neither bash nor zsh do not use the wording invalid command, and nether does Windows shell (cmd.exe) so I'm not sure what happens as you told us precisely zero information about your setup (note that the fact you're dealing with Drupal is most probably irrelevant to the problem in hand, and information about your system *is* relevant). -- 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.
Re: [git-users] Applying patch to Drupal module
On Mon, 24 Jun 2013 08:08:49 -0700 PJ Weisberg pjweisb...@gmail.com wrote: [...] Are you trying to run git commands inside an ftp client, rather than in a shell? Try !git apply example.patch. Not just for Git, but for any commands you want to run on the remote machine. Sorry, but what is this supposed to mean? In a typical interactive Unix shell that `!' would re-execute the last command which name begins with the string git. Did you mean FTP client then? But since when FTP started to support remote command execution? The `sftp` program of the OpenSSH suite supports `!' prefix as a way to pass commands to a local shell rather than interpreting them, but the OP did not talk about SFTP but rather about FTP, and in any case it's a local shell which gets executed, not remote. -- 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.
Re: [git-users] Incremental Git Push
On Thu, 20 Jun 2013 06:37:12 +0200 Magnus Therning mag...@therning.org wrote: Any ideas if it would be possible for Git to create a delta changeset that we could burn to DVD? Yes, this feature set is provided by the `git bundle` command [1]. 1. https://www.kernel.org/pub/software/scm/git/docs/git-bundle.html AFAICS from reading the man page there is no automatic recording of what has been bundled up in the past. That would mean that Jesse's workflow in Synergy couldn't be replicated in Git without a bit of manual record keeping, right? That is correct. He would need to put tags onto bundled commits of branches of interest or invent a way to just record those SHA-1 names down to a file or use `git notes`. Another way would be to (ab)use `git config` which is able to operate on arbitrary variables. -- 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.
Re: [git-users] Merging hotfix without merging all files.
On Wed, 19 Jun 2013 22:24:24 -0700 (PDT) Saurav cance...@gmail.com wrote: Suppose I have a project on MASTER branch with 100s of php files. To do a bug fixing in the project, i create a separate branch *git checkout -b bugfix* Then after fixing the bug in 3 files (for eg index.php, register.php and login.php), i merge it in the master branch *git checkout master **git merge bugfix* The above code will merge all the 3 files i made changes, but is there anyway that i can force GIT to merge only 2 files, say login.php and register.php only? Yes, pass the --no-commit option to `git merge` and it won't automatically record a merge commit but will rather leave the changes staged in the index. Then you'll be able to unstage the changes made to index.php by running $ git reset index.php After that, commit as usually. -- 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.
Re: [git-users] Merging hotfix without merging all files.
On Thu, 20 Jun 2013 17:35:54 +0530 Shouvik cance...@gmail.com wrote: Suppose I have a project on MASTER branch with 100s of php files. To do a bug fixing in the project, i create a separate branch *git checkout -b bugfix* Then after fixing the bug in 3 files (for eg index.php, register.php and login.php), i merge it in the master branch *git checkout master **git merge bugfix* The above code will merge all the 3 files i made changes, but is there anyway that i can force GIT to merge only 2 files, say login.php and register.php only? Yes, pass the --no-commit option to `git merge` and it won't automatically record a merge commit but will rather leave the changes staged in the index. Then you'll be able to unstage the changes made to index.php by running $ git reset index.php After that, commit as usually. But u cannot switch branch without commiting first right? and in order or merge a branch u need to checkout to the master branch. no? Of course, when you're merging, you first check out the branch which receives the merge (which will be the first parent of a prospective merge commit), and yes, you can only merge commits (not files or whatnot) since these are basic blocks of which repository history managed by Git consists. But what's the problem, really? If you recorded a bugfix commit (or a series of commits) on your bugfix branch, you just merge that branch into the (checked out) master branch. This is just a normal merge, you just prevent auto-creation of a merge commit and then rip out unwanted changes before actually making a commit. Or am I missing something? Can u specify the steps pls? No, you have to develop understanding of what you need to do and why, not just be able to copy paste a canned solution. P.S. Please don't top-post -- this breaks discussion flow. -- 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.
Re: [git-users] Merging hotfix without merging all files.
On Thu, 20 Jun 2013 10:22:25 -0400 wor...@alum.mit.edu (Dale R. Worley) wrote: [...] Yes, pass the --no-commit option to `git merge` and it won't automatically record a merge commit but will rather leave the changes staged in the index. Then you'll be able to unstage the changes made to index.php by running $ git reset index.php After that, commit as usually. My understanding is that one could also use this sequence: git checkout master git merge --no-commit bugfix and then selectively commit the changes one wanted to commit: git commit login.php register.php Am I correct? Yes, I beleive you're correct on this point. This would be somewhat easier to use if one wanted to then commit the remaining changes, as they would remain in the index for git commit Well, this is about different mindsets ;-) Mine is that if we do not need a set of files, we drop changes in them from the index, and then commit. -- 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.
Re: [git-users] Incremental Git Push
On Wed, 19 Jun 2013 00:21:51 -0700 (PDT) jhops jesse.h...@gmail.com wrote: Any ideas if it would be possible for Git to create a delta changeset that we could burn to DVD? Yes, this feature set is provided by the `git bundle` command [1]. 1. https://www.kernel.org/pub/software/scm/git/docs/git-bundle.html -- 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.
Re: [git-users] Re: Download documentation in others language
On Mon, 17 Jun 2013 02:23:00 -0700 (PDT) Aurélien PELLET pellet.aurel...@gmail.com wrote: Thanks for your replies. @Thomas Ferris Nicolaisen : It's exactly what i'm talking about. If it's not possible i keep doing with english version ... but it's unfortunate when the doc is available in a perfect french but without any link to download it. I once reported what I considered to be a problem with the content on git-scm.com and got a reply [1] which, among other things, pointed me to the correct venue to report bugs with this site -- it's filing bugs against the appropriate Github project [2]. I think you could try to do just that. 1. http://www.mail-archive.com/git@vger.kernel.org/msg24941.html 2. https://github.com/github/gitscm-next -- 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.
Re: [git-users] developers docs ?
On Sun, 16 Jun 2013 05:41:37 -0700 (PDT) the.u...@gmail.com wrote: I am curious to have a look at the source https://github.com/msysgit/git/. But since it is a rather big project I wonder is there a guide/walk-through to the structure of the source ? There's the directory named Documentation right in the root directory of the Git source tree [1]. Its subdirectories, technical and howto, might be of particular interest to you. I doubt there's any guide to the sources though as I do not see any need for it, and I much more doubt Git developers saw any need for it either -- anyone who's supposed to delve into Git sources is supposed to possess (or gain!) a certain level of expertise to do that. Basically you start with git.c and its main() and then use your developer tool (IDE with source parsing abilities, vim + ctags, emacs + whatever, `git grep` etc) to navigate the source tree to learn about things used from that root function. 1. https://github.com/git/git/ -- 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.
Re: [git-users] Git error
On Mon, 17 Jun 2013 06:18:49 -0700 (PDT) justin p denzilac...@gmail.com wrote: [...] An x-posted copy of this message is answered on the main Git list: http://news.gmane.org/find-root.php?group=gmane.comp.version-control.gitarticle=228065 -- 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.
Re: [git-users] git-rebranch
On Mon, 17 Jun 2013 06:28:35 -0700 (PDT) Dan Keder dan.ke...@gmail.com wrote: I made a small script for easier rebasing of development branches. It is useful in case you are developing in multiple (private) branches and you want to rebase your branches onto upstream often. [...] Consider posting this to the main Git list as well: * It's ripe with seasoned programmers who might find it interesting to scrutinize your code and spot problems with it. * Interesting scripts might make their way to the contrib section of the Git bundle, if enought people find it useful and there is some push for this. -- 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.
Re: [git-users] Best way to identify a version of a repo
On Fri, 14 Jun 2013 17:00:59 -0500 Deanna Delapasse ddelapa...@gmail.com wrote: [...] One thing I forgot to mention, is that it's pretty easy to reset the work tree after a checkout to discard all local changes by either doing git reset --hard or git checkout -- . (the dot is significant -- it means the current directory). This code is ONLY used one time, extracted, built and then deleted. Then consider using the so-called shallow cloning: when doing a clone you can pass the --depth=1 command-line option to limit the number of the history fetched to an absolute minimum, like this: $ git clone --depth 1 -b master would clone just the remote branch named master and fetch just the amount of history needed to contain the master's tip commit. -- 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.
Re: [git-users] trouble after 'git commit --amend': error with pull and push
On Sat, 15 Jun 2013 14:37:59 +0200 Thorsten Jolitz tjol...@googlemail.com wrote: I messed up a commit message, and wanted to fix it immediatly after the commit (but I already merged the commit into master and pushed both - master and work branch - to github, unfortunately). Thus I ran ,--- | git commit --amend `--- [...] To my surprise, a new commit hash was created, and the hash of the original commit disappeared from the history. That is perfectly reasonable: the SHA-1 name of a commit is calculated not just over the data comprising the snapshot of the repository that commit references but rather over the commit object itself as well, and it contains your commit message as well as author, committer names and e-mails, commit date and other metadata. Obviously, the commit object always changes when you do `git amend` (at least because the commit date changes). Then trying to push to orign at github, git tells me I can't push because head in orign is behind local head - pull first. You might consider to rightfully ignore this: Git assumes that if you're trying to push to a branch something which does not contain the tip of that branch in its history then this means someone managed to update that branch with their work and so you're supposed to reconcile that work with yours by means of merging (or rebasing), that's why it tells you to pull -- pulling means fetching and then merging. But since you know you've just re-written some history, you might as well consider force-pushing your work by doing git push --force github master work This should be first discussed with your fellow developers, if any, though: if they managed to fetch the current state of affected branches and base anything local on this state, your force-pushing will require them to rebase their local work on the updated state of the affected branches. Hence next time you should think hard about whether you really want to do commit amendment or other sorts of history rewriting if you've pushed your work already. Note that while history rewriting is a paramount property of Git, an essential rule of thumb is that only your purely local (unpublished, meaning unpushed to a public place) history is volatile, and anything published should in most cases be considered more or less cast in stone. But when I try to pull I get: ,- | $ git --no-pager pull -v | Von github.com:my/repo | = [aktuell] master - origin/master | = [aktuell] work - origin/work | Your configuration specifies to merge with the ref 'work | from the remote, but no such ref was fetched. | git exited abnormally with code 1. `- So what to do? This error has nothing to do with the commit amendment you did. When you do `git pull` like you showed (that is, without any refspecs which tell Git what to get from the remote side), `git pull` goes like this: 1) Considers the branch.your_checked_out_branch.merge configuration variable to know which branch is the upstream for the local one, and considers the branch.your_checked_out_branch.remote configuration variable to know where that branch should be fetched from. 2) Fetches the objects of the indicated branch which are missing locally from the indicated remote repository, writes them to your local git repository and writes the SHA-1 name of its tip commit into the special ref named FETCH_HEAD. 3) Attempts to merge lines of history referenced to by the FETCH_HEAD ref into the currently checked out branch -- in your simple case this will be just a single line of history. For instance, for one of my local repositories, which has two branches, master and uuid, both or which communicate with the same-named branches in a remote repository, origin, I have: $ git config --local --list | grep ^branch branch.master.remote=origin branch.master.merge=refs/heads/master branch.uuid.remote=origin branch.uuid.merge=refs/heads/uuid Now consider that unless you mistyped the error message, Git says it failed to fetch the ref named 'work -- notice the leading single quote. My take on this is that your branch.work.merge configuration variable contains a bogus value. You could check this by inspecting the output of $ git config --local --list or just by reading the .git/config file. In either case, you should supposedly fix the setting. *BUT* note that as explained above, pulling in your particular case really has no sense: Git would attempt to merge what it fetched from the remote side (your original, not yet amended commit) with your amended commit. Hence in your case you really have two options: 1) Force-push your modified branches as explained above. 2) Decide not to mess with the situation and revert your *local* branch(es) to the state before the amendment. That would amount to resetting them to their
Re: [git-users] Having trouble understanding how Git works?
On Thu, 13 Jun 2013 08:40:56 -0700 (PDT) vmhatup vmha...@gmail.com wrote: I'm trying to integrate some type of source code versioning. I come from a VSS background, where our workstations would connect to a server and 'check out' a solution/project into my workstation. Essentially, 'check out' the code into my PC and then ('check in') back to the server. Anyways, I'm trying to understand how Git works. I assumed that I would install Git in the server (where all source code will reside), Git is a DVCS, where the D stands for decentralized, so all the source code resides in all the local repositories your developers would have. It also might reside in any number of server repositories but they are not in any way special except according a policy you might implement. and then I'd install an add-on to VS2010 in my workstation to connect to the server. From VS2010 I would add my solution to the server, and do checkins/checkouts. So, I installed this version of Git in the serverhttp://git-scm.com/download/win, and I can see a box that asks me to create a new repository. I have no idea what box is being talked about here. What I don't seem to understand is how I can connect locally (from my VS2010) to that server. Unfortunately, here comes the pain. Since Git is a DVCS (see above) it does not implement client/server architecture by itself: all it has is special client support to access another Git instance over a set of network protocols (namely SSH and HTTP[S]) and special server support to talk to a Git client, and this code does not know which protocol is used to carry out the exchange. This means that setting up server-side Git requires setting up something which will serve the enclosing protocol access, like SSH or HTTP[S]. Setting up an SSH server on Windows is possible but requires a trained sysadmin. Somehow I feel you'd better skip this for now. Setting up an HTTP server is supposedly easier but making it work OK with Git is not. You might consider installing [1] under IIS. Yet another alternative is to not use stock Git on the server side and instead turn to a turn-key solution, like [2]. The third alternative is to not use Windows for the server side and instead use a POSIX environment for this -- with supposedly the most obvious choice for this being a Linux-based OS (I would personally recommend Debian). This, again, requires a person with the necessary skills. And yet another alternative is *not* having Git on the server side at all but instead hosting your shared repositories on a shared filesystem, that is, on a Windows share which could be provided by your Windows server. This does not require any special setup on the client computers except using a special URL for accessing the remote repository, like file:server/share/path/to/the/repository This setup requires accessig the share to use pass-through Windows client authentication, that is, merely navigating the \\server\share\path\to\the\repository UNC path using Windows Explorer must not ask the user for their credentials, otheriwse it's not gonna easily work with Git. In my workstation (VS2010), I installed Git Source Control Provider, but I don't see any option that lets me connect to the server. Regarding this, I, personally have nothing to say as I've never used this plugin. As Thomas already told you, getting your hand dirty with plain Git first is advised to gain understanding of how things work. 1. http://gitweb.codeplex.com/ 2. http://gitblit.com/ -- 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.
Re: [git-users] Best way to identify a version of a repo
On Fri, 14 Jun 2013 05:08:11 -0700 (PDT) Deanna Delapasse ddelapa...@gmail.com wrote: I need to checkout code from a repo and somehow identify it (timestamp, hash, …) such that at some later time I can extract the SAME versions of all the code. I’m provisioning cloud instances, so each time would be a fresh “get clone” into an empty folder. After I create the “master” (ie provision the FIRST instance) I need to record some way to identify it in case I have to recreate the master.I prefer NOT to alter the original repo (ie tag it), but prefer the ‘work’ of identifying the sources to be done on the client side. I'm not sure I exactly understand what do you want. If you do `git clone` on a client, then a mere call to git rev-parse HEAD would show you the SHA-1 name of the commit which is currently checked out to the work tree of that client's clone. Is this enough for your case? If you want to identify a commit in a Git repository having just a tree of (unmodified) sources checked out some time earlier, this task is more complicated: you could commit this whole tree and get the SHA-1 hash name of the root tree object. Getting the name of a commit object which references the same tree object in a master repository is, unfortunately, an O(N) task: you'll have to traverse all the commits and check the SHA-1 names of the root tree objects they reference. -- 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.
Re: [git-users] Best way to identify a version of a repo
On Fri, 14 Jun 2013 08:23:46 -0500 Deanna Delapasse ddelapa...@gmail.com wrote: Maybe - I wasn't sure if the commit hash would give me JUST the recently committed files or the entire codebase. I'll try it. Neither. Each commit references one complete snapshot of the repository, and also it references one or more parent commits. So, knowing the SHA-1 name of a commit gives you: 1) A way to recreate the precise state of the repository as it was when that commit was recorded [*]. 2) An ability to go back through the commit's ancestry line. 3) Certain other bits of meta information about the commit author, the committer, the date the commit was recorded etc. Each commit in the repository has its own distinct SHA-1 name and captures its own distinct state of the repository. [*] That's not exactly true: commits are cut from the so-called staging area, not from the work tree. And certain information attached to files by the file system underlying the work tree (such as NTFS file streams and Unix permission bits and owner/group information) will be lost. -- 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.
Re: [git-users] Best way to identify a version of a repo
On Fri, 14 Jun 2013 10:26:52 -0500 Deanna Delapasse ddelapa...@gmail.com wrote: I started with this approach yesterday. I tried this: git clone https://acct:p...@gethub.com/git ... i edited a file just to see what would happen git checkout hashcodeOfPriorCommit But git did NOT overwrite the file that I manually changed. Why was that? FYI, this won't happen in 'real life but I was trying to convince myself that the checkout would work. One thing I forgot to mention, is that it's pretty easy to reset the work tree after a checkout to discard all local changes by either doing git reset --hard or git checkout -- . (the dot is significant -- it means the current directory). -- 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.
Re: [git-users] Could not connect to the repository issue for (new linux user)
On Thu, 13 Jun 2013 07:39:17 -0700 (PDT) WooD Fung cw.wood.f...@gmail.com wrote: I followed the official document to setup ssh protocol for git. I can clone the repository by using root account. but I cannot clone the repository from a new Linux user account. Does anybody know how to fix it? Are you able to just execute Git after logging as that new user in the remote system using SSH? I mean, does mere $ ssh newuser@server 'git --version' works okay and prints out the Git's version information? If yes, then supposedly the problem is with the repository permissions: your user might not have sufficient rights to properly read the repository objects and metadata. -- 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.
Re: [git-users] Download documentation in others language
On Thu, 13 Jun 2013 03:13:07 -0700 (PDT) Aurélien PELLET pellet.aurel...@gmail.com wrote: Is it possible to download the documentation (PDF) in others available languages ? I read the documentation in English but on some technical terms I prefer to refer to the french version. An impossible thing when we don't have internet... What precisely do you call the documentation? [1], which is the reference documentation, seems (to me) to be only available in the form of HTML pages? 1. http://git-scm.com/docs -- 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.
Re: [git-users] Question: git merge origin/master
On Thu, 13 Jun 2013 11:00:42 -0400 Paul Smith p...@mad-scientist.net wrote: Hi all. This is just a simple question. Most of the discussions of merge from master to my branch I've seen recommend this: git checkout master git pull git checkout mybranch git merge master I did things this way at first, but as I understood git more it seemed to me that far simpler, and completely equivalent (with the exception that the master branch is not updated, which is fine) would be: git fetch git merge origin/master Is there some downside to this alternative that I'm not seeing, or other consideration (philosophical or otherwise) that should be taken? If you have a local branch named master which is set to track origin/master, the second sequence won't update it because `git pull` in the first sequence does fetching *and* then merging of what was fetched into the currently checked out branch -- master. Note that you might as well be *not* interesting in having such a local master branch at all! For instance, if you intend to contribute to someone else's project, and forked a local branch my-feature off that repo's master branch, you might freely go on with the approach you asked about -- that is, fetch from the remote periodically and then -- at key times -- integrate the updated remote's master branch into your local branch. But note that in this particular case you might be interested in periodical rebasing your local branch instead. -- 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.
Re: [git-users] Question: git merge origin/master
On Thu, 13 Jun 2013 11:37:42 -0400 Paul Smith p...@mad-scientist.net wrote: [...] The question above is talking only about intermediate merge steps, where I want to bring in other peoples' changes into my work branch before I merge back to master. I'm just wondering if there's some issue with merging directly from origin/master, rather than first updating my local master and merging from that. I can't see one. I can see one: commit ordering in case of your local master having unpushed commits at the time of doing `git pull` so that the resulting merge is a true merge, not a fast-forward. Otherwise there shouldn't be any differences. -- 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.
Re: [git-users] Re: error: GIt has no installation candidate
On Mon, 10 Jun 2013 08:30:33 +0200 Martin Møller Skarbiniks Pedersen traxpla...@gmail.com wrote: I am sorry yes I am using UBUNTU and here is my system configuration No LSB modules are available. Distributor ID:Ubuntu Description:Ubuntu 10.04.4 LTS Desktop 10.04 ran out of support 2013-05-09 so that is probably the reason you can't get a git package for that system. I think the repositories should be accessible anyway. Ubuntu seems to archive unsupported past releases (just like Debian does). To make Lucid packages available one should replace normal URL for packages in /etc/apt/sources.list with deb archive.ubuntu.com/ubuntu lucid main and comment out an URL used to fetch security updates (since there will be no security updates, and the URL is invalid anyway). Then after the next run of `apt-get update` the git meta package should become available (`apt-cache policy git` should list a version and an URL for 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/groups/opt_out.
Re: [git-users] Re: error: GIt has no installation candidate
On Mon, 10 Jun 2013 14:03:21 +0400 Konstantin Khomoutov flatw...@users.sourceforge.net wrote: [...] To make Lucid packages available one should replace normal URL for packages in /etc/apt/sources.list with deb archive.ubuntu.com/ubuntu lucid main Or, rather, with deb http://archive.ubuntu.com/ubuntu lucid main -- 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.
Re: [git-users] Clarification Regarding Git Commit Granularity
On Thu, 6 Jun 2013 22:49:24 -0700 PJ Weisberg pjweisb...@gmail.com wrote: So, one thing I'm still a bit fuzzy on is the recommend granularity of commits, and I'm wondering if anyone can help me out. [...] If I understand correctly, you're making two logical changes, each of which touches several files. Then of course you'll want to make two commits. Put them in one commit and you're unnecessarily tying together unrelated things. Break them up into ten or twenty commits and you have a bunch of half-done changes that don't actually work and need to be combined with other commits before they actually make sense. By putting each change into a single commit you have a piece of working software after every revision, which makes it easier to bisect when diagnosing a bug, for example. But note that it's a normal Git practice to crunch a series of small commits which introduce partial changes (and comprise non-working states of a program) on a private feature branch, and then squash-merge [*] them into a single pretty commit on an integration branch which is to be published (i.e. pushed somewhere). You don't *have to* take this route but some people prefer to do things this way. One upside of this approach is relative ease of rolling back to any committed state while you're exploring possible ways to implement a feature by trial and error. [*] Read up on the --squash option of the `git merge` command. -- 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.
Re: [git-users] Problem with git checkout --orphan
On Thu, 6 Jun 2013 14:51:50 -0400 wor...@alum.mit.edu (Dale R. Worley) wrote: [...] $ git --version git version 1.7.7.6 [...] $ # Try to create an orphaned branch. This fails. $ git checkout --orphan first-new-branch fatal: You are on a branch yet to be born Works for me with Git 1.8.1: C:\tmp\foogit init Initialized empty Git repository in C:/tmp/foo/.git/ C:\tmp\foogit checkout --orphan foo Switched to a new branch 'foo' C:\tmp\foogit checkout --orphan foo2 Switched to a new branch 'foo2' C:\tmp\foogit checkout --orphan foo3 Switched to a new branch 'foo3' C:\tmp\foogit --version git version 1.8.1.msysgit.1 -- 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.
Re: [git-users] Problem with git checkout --orphan
On Fri, 7 Jun 2013 11:30:38 -0400 wor...@alum.mit.edu (Dale R. Worley) wrote: From: Konstantin Khomoutov flatw...@users.sourceforge.net Works for me with Git 1.8.1: Good. I will check again when I upgrade to Git =1.8.1. Looks like that was fixed by commit abe1998 [1] (and further improved since -- just do `git log --grep unborn -F` on Git master). 1. https://github.com/git/git/commit/abe1998 -- 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.
Re: [git-users] Re: how to connect the two local machine in order use git
On Thu, Jun 06, 2013 at 12:09:57AM -0700, Manjunath Hv wrote: Hi Philip, Please find the details below Machines : One is Windows 7 other is windows XP Version : 1.8.1.msysgit.1 I can see the file as well as directories on other system. Will u please tell me how to check remote file permissions?? The error message is from git. The same message is coming from Git Bash as well as Git GUI Path :git remote add origin username@machinename:~/git-manju git clone usename@machinename:~/git-manju Please read the docs next time, do not just copy and paste random bits found in the internets: the syntax user@server:repo implies using the SSH protocol for communication which is not available in stock Windows. It might be set up by installing any of available third-party packages implementing SSH for Windows on the host which you want to designate to be a server. But a simpler way to set things up when it comes to Windows is to just use Windows built-in file sharing mechanism (known as SMB or CIFS -- it's this procotol which enables you to see the file as well as directories on other system). To do this you have to use the file protocol when constructing a Git URL for your remote repository, so you should do something like this: git remote add winxp file:windowsxp/sharename/path/to/git/repo Here the file:// bit is the URL schema which tells Git which protocol to use for accessing the repository, the //windowsxp/sharename is the portable way to spell the Windows-ish \\windowxsp\sharename UNC path, and the path/to/git/repo is the path to the actual Git repo you want to access available via that share. Before putting this to work you have to make sure that *transparent* authentication works on that share for the contacting computer\user combo, that is, when you boot the box which is to access your remote repo, log in with the user which is to call `git push`, fire up Windows Explorer and navigate the \\windowsxp\share share, Windows must let you in without asking for credentials. You also must be able to create and modify files in the target directory on that share if you wish to push changes there (i.e. to update the target repo). -- 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.
Re: [git-users] error: GIt has no installation candidate
On Thu, 6 Jun 2013 06:54:42 -0700 (PDT) Deepak Selvaraj dpkselva...@gmail.com wrote: I am trying to install Openstack in my new virtual machine, but I am getting a error saying the package git is not available and it says package git has no installation candidate. But I already installed git using sudo apt get install git .. Could someone please help me sorting it out ? these are the steps that I follow 1. sudo apt-get install git s... Done Building dependency tree Reading state information... Done Package git is not available, but is referred to by another package. This may mean that the package is missing, has been obsoleted, or is only available from another source E: Package git has no installation candidate //error that i got What does apt-cache policy git tells to you? What do you have in your /etc/apt/source.list ? I have no idea what openstack is, but somewhere down your message I noticed the word lucid which hints what you describe might be happening on an Ubuntu system -- is that true? If it is, why did not you tell us anything about your setup? Posting an output of running lsb_release -a would be just enough. Please do. [...] -- 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.
Re: [git-users] Re: list all the branch that contains commit title is xxxx yyyy
On Wed, 5 Jun 2013 22:35:44 +0800 lei yang yanglei.f...@gmail.com wrote: any help ? On Tue, Jun 4, 2013 at 11:24 AM, lei yang yanglei.f...@gmail.com wrote: list all the branch that contains commit title is note: the commit-id is not the same though the commit content is the same in different branch Well, if you're looking for a ready-made Git command to do this, you're possibly out of luck. But I fail to see what's the problem with scripting that: reading the output of `git for-each-ref 'refs/heads/*'` could be combined with calls to `git log --grep=^ `. -- 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.
Re: [git-users] Error code -6
On Thu, 30 May 2013 14:54:58 -0700 (PDT) Dallin Lauritzen dallin.laurit...@gmail.com wrote: [...] File /Library/Python/2.7/site-packages/git/cmd.py, line 377, in execute raise GitCommandError(command, status, stderr_value) GitCommandError: 'git pull' returned exit status -6: [...] If anyone else has encountered this error or knows what the -6 means, please help. If it is what I think, I'd appreciate help designing a way to slow my script down to avoid this problem. Well, I don't know how these Python Git bindings work but it sounds like the exit status is the exit code of a process (`git pull` in this case). The exit code of a process is defined to be an integer, and it's defined that only its least significant 8 bits have any sense [1]. Plus there's a convention (at least on Linux -- I've no time to google for exact pointers at the moment) that if bit 7 is set in the exit code, this means the process exited because it was sent an uncaught signal, and then the rest of the bits define the signal code. Since bit 7 (MSB) is set, the Python bindings supposedly interpret the number as negative. We can subtract this number (-6) form 0 to get the code of the signal which killed the process. This will be 6, which, on Linux (and FreeBSD), means SIGABRT -- the signal which is usually sent to the process when it calls abort(3). On a reasonably up-to-date Git tree I see % git grep -Fw 'abort(' | wc -l 18 which means there's 18 calls to abort(3) in the Git code. So my take is that Git encounters certain condition which makes it panic and abort execution. So I'd try to capture the Git's standard error stream to see what it printed before aborting. P.S. Note that if you're running an OS other than Linux, the signal numbers might be different -- check for yourself. I also wonder what's that `stderr_value` parameter to GitCommandError is about -- may be it could be somehow inspected to get hold on the failed command's standard error output? I'm not Python-literate so can't tell further. 1. http://pubs.opengroup.org/onlinepubs/009695399/functions/exit.html -- 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.