[git-users] Re: Git rules not being ignored from file that itself is ignored
Reading the post, this might have been not quite what I wanted to describe, so I'll take another run at it, with this: Locally (not in the repo yet), I have the following files: README.md package.json src src/things1 src/things.ts src/.eslintrc.json src/thing1.js src/things1/.gitignore src/things1/things2 src/things1/things2/test.js src/things1/things2/.gitignore src/things1/things2/things3 src/things1/things2/test2.js src/things1/things2/things3/test3.js Within src/things1/things2/.gitignore I have the following rule: /test2.js *but*, within src/things1/.gitignore, I have the following rule: things2/.gitignore Using git status --untracked-files --porcelain I see in the results that src/things1/things2/.gitignore is *not* included in the list, which agrees with what I expected to see. However, I *also* do not see src/things1/things2/test2.js which is *not* what I expected. Somehow, the *rules* from src/things1/things2/.gitignore have been applied even though this file will not be checked in. How can this be?? Should not the rules in src/things1/things2/.gitignore have been *ignored*, since it's not going to be checked in? Please advise. Best Regards Peter -- You received this message because you are subscribed to the Google Groups "Git for human beings" group. To unsubscribe from this group and stop receiving emails from it, send an email to git-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/git-users/d93e78cd-eb7a-483c-90bf-e1e886707591n%40googlegroups.com.
[git-users] Git rules not being ignored from file that itself is ignored
Hey there folks! I'm new here, so please forgive me if this is an already answered question. I have a repo to which I am about to add some files. In this repo, I have the following hierarchy: README.md package.json src src/things1 src/things.ts src/.eslintrc.json src/thing1.js src/things1/.gitignore src/things1/things2 src/things1/things2/test.js src/things1/things2/.gitignore src/things1/things2/things3 src/things1/things2/test2.js src/things1/things2/things3/test3.js Within src/things1/things2/.gitignore I have the following rule: /test2.js *but*, within src/things1/.gitignore, I have the following rule: things2/.gitignore Using git status --untracked-files --porcelain I see in the results that src/things1/things2/.gitignore is *not* included in the list, which agrees with what I expected to see. However, I *also* do not see src/things1/things2/test2.js which is *not* what I expected. Somehow, the *rules* from src/things1/things2/.gitignore have been applied even though this file will not be checked in. How can this be?? Should not the rules in src/things1/things2/.gitignore have been *ignored*, since it's not going to be checked in? Please advise. Best Regards, Peter -- You received this message because you are subscribed to the Google Groups "Git for human beings" group. To unsubscribe from this group and stop receiving emails from it, send an email to git-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/git-users/7ae973d7-07d4-4063-9b93-36bea4e9b470n%40googlegroups.com.
[git-users] Re: Fatal Error when commit to AWS Code Commit
Anyone can help me please please. A billion thanks for your help. On Tuesday, December 18, 2018 at 7:19:58 PM UTC+8, Peter wrote: > > Dear All, > > When I do a git push -r origin master, it display following messages. > > fatal: unable to access ' > https://git-codecommit.eu-west-1.amazonaws.com/v1/repos/WHOPQDTB_TestAutomation/': > > error:1408F10B:SSL routines:ssl3_get_record:wrong version number > > > > Git Config: > > [http] > > [https] > > proxy = http://10.64.150.9:8080 > > [filter "lfs"] > > required = true > > clean = git-lfs clean -- %f > > smudge = git-lfs smudge -- %f > > process = git-lfs filter-process > > [user] > > name = kwong > > email = kw...@who.int-at-570226278193 > > > > > > Git version 2.20.1. > > > > Please help. Thanks. > > -- You received this message because you are subscribed to the Google Groups "Git for human beings" group. To unsubscribe from this group and stop receiving emails from it, send an email to git-users+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[git-users] Fatal Error when commit to AWS Code Commit
Dear All, When I do a git push -r origin master, it display following messages. fatal: unable to access ' https://git-codecommit.eu-west-1.amazonaws.com/v1/repos/WHOPQDTB_TestAutomation/': error:1408F10B:SSL routines:ssl3_get_record:wrong version number Git Config: [http] [https] proxy = http://10.64.150.9:8080 [filter "lfs"] required = true clean = git-lfs clean -- %f smudge = git-lfs smudge -- %f process = git-lfs filter-process [user] name = kwong email = kw...@who.int-at-570226278193 Git version 2.20.1. Please help. Thanks. -- You received this message because you are subscribed to the Google Groups "Git for human beings" group. To unsubscribe from this group and stop receiving emails from it, send an email to git-users+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[git-users] How to initialize Git in a directory that contains a sub-directory that already uses a git repo
I am working on a project which required pulling source code into a subdirectory from a remote repo. Using the following commands repo init -u -b -m repo sync -c --no-tags which I believe are python interfaces to git. In any case I have this one subdirectory that already has git initialized in it. I would like to use git to manage the super directory that contains this sub-directory while maintaining the pre-existing git information in the subdirectory including the ability to do new pulls from that subdirectory's repo if necessary. (I don't have permission to push.) I would like to be able to run commits at the top level directory that mark the state of the entire tree including this subdirectory. I'm relatively new to git and just discovered submodules which seems like the right way to go, but all the basic examples of submodules seem to have you clone the submodule into a super-repo rather than somehow initialize it into the super-repo. Thanks, Peat -- You received this message because you are subscribed to the Google Groups "Git for human beings" group. To unsubscribe from this group and stop receiving emails from it, send an email to git-users+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[git-users] git fetch deletes remote references
Hi, I set fetch.prune on an existing repository. If I push a new tracking branch to the remote and fetch the remote branch, the reference to the remote branch is deleted. Is this expected behavior or a bug? Using git 2.6.3 on Ubuntu. Doing the following commands on a existing repository. $ git config fetch.prune true $ git checkout -b bug/bug-1 Switched to a new branch 'bug/bug-1' $ touch bugfix $ git add . $ git commit -a $ git push --set-upstream origin bug/bug-1 Counting objects: 2, done. Delta compression using up to 8 threads. Compressing objects: 100% (2/2), done. Writing objects: 100% (2/2), 242 bytes | 0 bytes/s, done. Total 2 (delta 1), reused 0 (delta 0) To g...@github.com:petervanderdoes/Testing.git * [new branch] bug/bug-1 -> bug/bug-1 Branch bug/bug-1 set up to track remote branch bug/bug-1 from origin. $ git fetch origin bug/bug-1:refs/remotes/origin/bug/bug-1 >From github.com:petervanderdoes/Testing x [deleted] (none) -> origin/bug/bug-1 $ git branch -r origin/master $ git branch * bug/bug-1 master The branch bug/bug-1 does still exist on github. Peter -- Peter van der Does GPG key: CB317D6E Site: http://avirtualhome.com GitHub: https://github.com/petervanderdoes Twitter: @petervanderdoes -- You received this message because you are subscribed to the Google Groups "Git for human beings" group. To unsubscribe from this group and stop receiving emails from it, send an email to git-users+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: [git-users] Enforce C# code style with git hooks
On 01/13/2015 02:35 PM, Marko Paloski wrote: Hello, I want to make i script that check the code style in the commit, so if don't matches, it will not allow the developers to commit the code. The script will be in pre-commit local or in pre-recieve on the server. I find something about uncrustify : http://www.itk.org/pipermail/insight-developers/2010-September/015333.html http://uncrustify.sourceforge.net/ https://github.com/bengardner/uncrustify But i don't know how to implement. Yes it can be bash or powershell script. Thanks, I don't know uncrustify, how can you tell with uncrustify if code is not in your preferred code style? -- Peter van der Does GPG key: CB317D6E Site: http://avirtualhome.com GitHub: https://github.com/petervanderdoes Twitter: @petervanderdoes -- You received this message because you are subscribed to the Google Groups Git for human beings group. To unsubscribe from this group and stop receiving emails from it, send an email to git-users+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: [git-users] Enforce C# code style with git hooks
On 01/13/2015 02:35 PM, Marko Paloski wrote: Hello, I want to make i script that check the code style in the commit, so if don't matches, it will not allow the developers to commit the code. The script will be in pre-commit local or in pre-recieve on the server. I find something about uncrustify : http://www.itk.org/pipermail/insight-developers/2010-September/015333.html http://uncrustify.sourceforge.net/ https://github.com/bengardner/uncrustify But i don't know how to implement. Yes it can be bash or powershell script. Thanks, In the file .git/hooks/precommit you run the uncrustify analysis and depending on the result, you exit the script with 0 if it was ok, and 1 if it was not ok. If you exit with a 1 the commit will not be done. -- Peter van der Does GPG key: CB317D6E Site: http://avirtualhome.com GitHub: https://github.com/petervanderdoes Twitter: @petervanderdoes -- You received this message because you are subscribed to the Google Groups Git for human beings group. To unsubscribe from this group and stop receiving emails from it, send an email to git-users+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: [git-users] Installing GIT on Ubuntu 12.04
On 07/17/2014 12:12 AM, Ellick Marquez wrote: Hi everybody, I want to install git on my computer with ubuntu 12.04 but when I put the next code sudo apt-get install git on my terminal, it shows me that the package git was removed or it doesn't exist. Please help me, I really need to use GIT To install you have to use sudo apt-get git-core But 12.04 gives you git 1.7.0.4. If you want the latest version check out my PPA: https://launchpad.net/~pdoes/+archive/ubuntu/ppa Currently it has version 2.0.2 available for Ubuntu versions: - 10.04 (Lucid) - 12.04 (Precise) - 13.10 (Saucy) - 14.04 (Trusty) Just add the PPA and use sudo apt-get install 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/d/optout.
[git-users] git-users+unsubscr...@googlegroups.com
On 3/3/2014 7:40 PM, git-users@googlegroups.com wrote: Today's Topic Summary Group: http://groups.google.com/group/git-users/topics * How to install GitWeb on Windows? #group_thread_0 [1 Update] * Git and Multi-Module Maven Projects #group_thread_1 [3 Updates] How to install GitWeb on Windows? http://groups.google.com/group/git-users/t/54f9e9ad547f3f93 César Iván Orozco Cervantes cesar.orozco.cervan...@gmail.com Mar 03 12:52PM -0800 Hi everyone, I'm trying to use *GitWeb *to explore my repositories, I'm completely new to it, so I'm having a little problems, I know that * GitWeb *is shipped with *Git*, I downloaded it from ...more http://groups.google.com/group/git-users/msg/f7cbd2dce77cd0f9 Back to top #digest_top Git and Multi-Module Maven Projects http://groups.google.com/group/git-users/t/520320441e437812 Eric Kolotyluk eric.koloty...@gmail.com Mar 03 11:57AM -0800 In simple terms I understand that using one git repo per project is the most sane choice. But when I have Maven Projects that have one or more hierarchies of modules, I am not sure the best ...more http://groups.google.com/group/git-users/msg/5c28713c46c5bdef Back to top #digest_top Thomas Ferris Nicolaisen tfn...@gmail.com Mar 03 12:37PM -0800 On Monday, March 3, 2014 8:57:44 PM UTC+1, Eric Kolotyluk wrote: One choice is to put all of My Project in a single repo, but if the project gets really big, or I want to release some ...more http://groups.google.com/group/git-users/msg/85b9dbe5a65cc882 Back to top #digest_top Mark Derricutt m...@talios.com Mar 04 09:45AM +1300 On 4 Mar 2014, at 9:37, Thomas Ferris Nicolaisen wrote: Here's the clue. All modules that share release schedule/versioning CAN be in the same repository. All modules that have distinct ...more http://groups.google.com/group/git-users/msg/5684473a4740ac70 Back to top #digest_top -- 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. -- 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] git diff not showing details
Windows 7 Git Bash or Command line, both act the same. When I change a file and then run *git diff* I get: C:\workshop\gitgit diff diff --git a/thirdfile.txt b/thirdfile.txt index 7caac66..f6eb45c 100644 Binary files a/thirdfile.txt and b/thirdfile.txt differ How do I get it to show the lines that have been changed? -- You received this message because you are subscribed to the Google Groups Git for human beings group. To unsubscribe from this group and stop receiving emails from it, send an email to git-users+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: [git-users] Strange effect when tar-ing a cloned repository
Hi Dale, Well ehhh. I feel somewhat ashamed right now When I followed your last instructions I stumbled upon a few hardlinks in the tar-file from my original source. And, as I understood Git treats these hardlinks as separate files. And yes, in the tar-file from Git I found a few exact copy's for several binaries. But now all with a unique inode-number, wheras these files in the original tar-file had the same inode . So, case closed I think. Now I now my target will still function 100% with its filesystem from Git, but several files will be present as 100% duplicates, thus using up more memory. But luckily I've got more than enough flash ! Perhaps In the near future I'm gonna try one of the following : 1) Use pre- post-scripts in Git to prepare the source (undo it from hardlinks, replace them with soft ones) 2) Look for a third party tool that does this for me 3) Take a look at SVN or Mercurial to see if this could be more suitable for this specific goal (although I realy would like to stick to Git !) Many, many thanks for all your help ! Kindest regards, Peter Op woensdag 21 augustus 2013 19:44:53 UTC+2 schreef Dale Worley: From: peter ing...@gmail.com javascript: The files that I suspect are all compiled without stripping (debug symbols present in the file). When I delete all these files the size of my tar-bal from the original filesystem is nearly the same as the one made from the git checkout. Here some things to check: Produce tar files rather than tar.gz files and see if the size difference is still present. The ordering of files in a tar file might affect how efficient the compression is. Get a directory listing of both tar files (-tv) and see if they contain exactly the same files, and with exactly the same lengths. Do a tree file comparison between the files that go into the original tar and the ones that go into the new tar. Dale -- You received this message because you are subscribed to the Google Groups Git for human beings group. To unsubscribe from this group and stop receiving emails from it, send an email to git-users+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: [git-users] Strange effect when tar-ing a cloned repository
Hi Dale, Well, I've been reading the articles you advised. And I've done some extensive testing with various situations. But till now, all without the result I would like. My files turned out not to be 'contaminated' with large holes, so every experiment with 'sparse options' (while copying, tar-ing git-checkout) yielded the same result. But just now I found out one curious thing ! After a series of trials, isolating (if possible) the files that are the cause of the problem I found one difference between these files and the rest in the filesystem. The files that I suspect are all compiled without stripping (debug symbols present in the file). When I delete all these files the size of my tar-bal from the original filesystem is nearly the same as the one made from the git checkout. So, the quest continues .. Regards, Peter Here's one explanation: http://en.wikipedia.org/wiki/Sparse_files#Sparse_files_in_Unix Also, read the du and cp manual pages, looking for the words holes and sparse, to see situations where this matters. Dale -- You received this message because you are subscribed to the Google Groups Git for human beings group. To unsubscribe from this group and stop receiving emails from it, send an email to git-users+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: [git-users] Strange effect when tar-ing a cloned repository
Hi Martin, Thanks, but my problem is not the difference between the size of the source in the git-repository and the tar-file made from the same source. Obviously tther will be differences depending on the compressing-algorithm used by tar and git. My problem is the difference between 2 tar-files. One made from the source before committing and pushing, and the second tar, made from the same source after cloneing and checking-out. I would expect them to be the same size (apart from small differences due to .gitignore etc). But an 20% increase is too much ! Regards, Peter Op maandag 19 augustus 2013 22:59:24 UTC+2 schreef Martin Møller Skarbiniks Pedersen: On 19 August 2013 21:10, peter boudewijns ing...@gmail.com javascript: wrote: Hi All, [...] When making a compressed tarball from the files from the repository (after clone/checkout) I get a very much larger tar.gz-file. Size goes up from 16M to 21M (!?) Not so strange. git is very good at compressing. One my of bare git repository is 32M but a tar.gz file of all files excluding the .git directory is 92M. /Martin -- 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] Strange effect when tar-ing a cloned repository
Hi Philip, Tnx for your tip. But I made 100% sure NOT to include the .git directory. And still I get a the difference between 2 tar-files. One made from the source before committing and pushing, and the second tar, made from the same source after cloneing and checking-out. I would expect them to be the same size (apart from small differences due to .gitignore etc). But an 20% increase is too much ! Regards, Peter Op maandag 19 augustus 2013 21:47:15 UTC+2 schreef Philip Oakley: - Original Message - *From:* peter boudewijns javascript: *To:* git-...@googlegroups.com javascript: *Sent:* Monday, August 19, 2013 8:10 PM *Subject:* [git-users] Strange effect when tar-ing a cloned repository Hi All, I've been trying to put my filesystem for a very small busybox-based distro into a git-repository. And with succes. The only strange thing I can not get my head around is the following : When making a compressed tarball from the files from the repository (after clone/checkout) I get a very much larger tar.gz-file. Size goes up from 16M to 21M (!?) Has anyone got a clue ? Thanks PeTer The usual reason is that you 'forgot' that the git repo itself is inside the hidden directory .git at the top level. So you have both your working tree of regular files, and then you have the hidden repo storage - so you have everything twice, and the history as well! Have a look at the 'git archive' command if you want just your your work tree, without the whole repo history. Philip -- You received this message because you are subscribed to the Google Groups Git for human beings group. To unsubscribe from this group and stop receiving emails from it, send an email to git-users+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: [git-users] Strange effect when tar-ing a cloned repository
Hi tombert, No, not yet. At this moment I'm busy makeing a detailed list from all file- directory-sizes before and after git-commit/git-checkout. Thereafter I'll surely try 'git gc' ! Regards, Peter Op dinsdag 20 augustus 2013 09:28:23 UTC+2 schreef tombert: did you already try a cleanup? git gc -- 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] Strange effect when tar-ing a cloned repository
Hi Dale, I've been running some tests to see if I could find the origin of my size-difference. As it turned out, when examining the filesystem's size on the target with 'su', this was about 10M bigger in case of the git-cloned filesystem (I make a jffs2-file to flash the target, thereafter examine the target via a tty). The entire difference could be pinned down in just 1 directory, 'sbin'. So, I made complete listings (ls) from /sbin, both the original as the git-cloned version. And they are exactly the same !? But with su -hs the /sbin directory yields the 10M difference .. ? I do not know enough about the way Linux writes its files, and how it determines the size of the files. But it seems to me the git-cloned files contain empty space that occupies filesystem-space, but is not counted when calculating the actual filesize . Both versions function 100% on the target, so why worry ? But I still would like to know whats going on And yes, I also used git gc (--aggressive), but this yields no improvement at the client side upon cloneing/checking out. To be continued Regards, Peter My guess is that the cloned repository isn't compressed in exactly the same way as the original repository. The first step would be to find out the amount of disk space occupied by the original and the cloned repositories (using du -s) rather than depending on the size of the .tar files. If you want the repository to be small, look into git gc --aggressive. Dale Dale Worley -- Today is: 12.19.16.17.0 9 Ahaw 18 Mak Only 1100 more shopping days until the end of the World. -- 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] Strange effect when tar-ing a cloned repository
Hi Dale, Thanks for the explanation and tips. I'm gonna study the articles this evening. So perhaps I can find the conclusive answer to my 'problem'. Kindest regards, Peter Here's one explanation: http://en.wikipedia.org/wiki/Sparse_files#Sparse_files_in_Unix Also, read the du and cp manual pages, looking for the words holes and sparse, to see situations where this matters. Dale -- You received this message because you are subscribed to the Google Groups Git for human beings group. To unsubscribe from this group and stop receiving emails from it, send an email to git-users+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/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: Hi, 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... BR, A There could be major performance drawbacks, memory problems and just the shear amount that will be displayed. Completion works on the principal of getting all potential completions in memory and then showing them. So for example with branches, git checkout bTABTAB All branches that start with b are loaded in memory and displayed. Now imagine this with all your commits. Do a git rev-list|wc -l on your repository and see how long it takes and how many commits you have. For the kernel repo for example: $time git rev-list --all | wc -l 419811 real0m5.209s user0m4.881s sys 0m1.280s So 419811 possibilities would be displayed after you do git diffTABTAB Assume you know the SHA1 starts with e $time git rev-list --all | grep ^e | wc -l 26365 real0m5.826s user0m6.223s sys 0m0.923s 26365 possibilities on git diff eTABTAB -- Peter van der Does GPG key: CB317D6E Site: http://avirtualhome.com GitHub: https://github.com/petervanderdoes Twitter: @petervanderdoes -- 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] how to protect my source while allowing a new developer to work
I've got a new developer who I'm concerned might hurt our git repository (by checking into master for example) if we give him r/w access to our bitbucket repo. I want him to be able to check in to his branch only and be able to merge master changes to his branch, but I don't want him to be able to commit to the master branch. Sorry if my question is obvious, I've just never had to do this before. Thanks, -- 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] A few questions which arose while considering moving a multi-hundred developer organization to Git.
running a script to update a branch with changes from its parent branch? When I want to move code from a child bucket to a parent bucket (synchronize their contents), how difficult is this? Any best practices to follow, assuming bucket === branch holds true? Again, thank you in advance to everyone who is able to contribute to my knowledge related to any of the above. Regards, Peter. -- 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] git fetch question
I have a local repo and a remote repo, something, both contain the branch develop. Before I do a git fetch git rev-parse develop - SHA1 git rev-parse something/develop - SHA1 $git checkout master $git fetch something $git rev-parse develop SHA1 $git rev-parse something/develop SHA2 $git status Your branch is behind by x commits Perfect, just as I expected. But what if I don't want to do a git fetch something The reason for that is that I would be fetching a whole lot more than I need. The remote repo has several other branches that I have no need for. I would like to do something like git fetch something but only for one branch. If I do git fetch something develop, it ends up in FETCH_HEAD, if I do git fetch something develop:develop you get: $git checkout master $git fetch something develop:develop $git rev-parse develop SHA2 $git rev-parse something/develop SHA1 $git status Your branch is ahead by x commits So is there a way to update the SHA in something/develop? I want to use this in a script, comparing the local branch and remote branch. -- Peter van der Does GPG key: CB317D6E IRC: Ganseki on irc.freenode.net Twitter: @petervanderdoes -- You received this message because you are subscribed to the Google Groups Git for human beings group. To post to this group, send email to git-users@googlegroups.com. To unsubscribe from this group, send email to git-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/git-users?hl=en.
[git-users] Getting the latest tag
I found two ways to get the latest tag but what is difference, if there is a difference? Solution 1: git describe --tags $(git rev-list --tags --max-count=1) Solution 2: git for-each-ref refs/tags --sort=-authordate --format='%(refname)' --count=1 | sed 's/^refs\/tags\///' -- You received this message because you are subscribed to the Google Groups Git for human beings group. To view this discussion on the web visit https://groups.google.com/d/msg/git-users/-/RDuvi8r0Gk4J. To post to this group, send email to git-users@googlegroups.com. To unsubscribe from this group, send email to git-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/git-users?hl=en.
Re: [git-users] get rid of old commits
You could try to run git config --global gc.auto 100 on your repo machine and work machine. If the number of loose objects exceeds the value of the gc.auto configuration variable, then all loose objects are combined into a single pack usinggit repack -d -l. On Thu, Sep 30, 2010 at 2:08 AM, Adam Prescott mention...@gmail.com wrote: My understanding is that git will handle running git gc for you when you have a fair amount of stuff it can clear up (I've seen it do this automatically, personally, but I could be wrong). So even if the answer is no, it might not be the answer to the question, has 'git gc' ever been run? -- You received this message because you are subscribed to the Google Groups Git for human beings group. To post to this group, send email to git-us...@googlegroups.com. To unsubscribe from this group, send email to git-users+unsubscr...@googlegroups.comgit-users%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/git-users?hl=en. -- liuhui998 blog http://liuhui998.com -- You received this message because you are subscribed to the Google Groups Git for human beings group. To post to this group, send email to git-us...@googlegroups.com. To unsubscribe from this group, send email to git-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/git-users?hl=en.
Re: [git-users] get rid of old commits
If you really want to remove old commit, you can just use git rebase -i http://book.git-scm.com/4_interactive_rebasing.html pick fc62e55 added file_size pick 9824bf4 fixed little thing pick 21d80a5 added number to log pick 76b9da6 added the apply command pick c264051 Revert added file_size - not implemented correctly # Rebase f408319..b04dc3d onto f408319 # # Commands: # p, pick = use commit # e, edit = use commit, but stop for amending # s, squash = use commit, but meld into previous commit # # If you remove a line here THAT COMMIT WILL BE LOST. # However, if you remove everything, the rebase will be aborted. # http://book.git-scm.com/4_interactive_rebasing.htmlThe last useful thing that interactive rebase can do is drop commits for you. If instead of choosing 'pick', 'squash' or 'edit' for the commit line, you simply remove the line, it will remove the commit from the history. On Thu, Sep 30, 2010 at 3:47 PM, Peter liuhui...@gmail.com wrote: You could try to run git config --global gc.auto 100 on your repo machine and work machine. If the number of loose objects exceeds the value of the gc.auto configuration variable, then all loose objects are combined into a single pack usinggit repack -d -l. On Thu, Sep 30, 2010 at 2:08 AM, Adam Prescott mention...@gmail.comwrote: My understanding is that git will handle running git gc for you when you have a fair amount of stuff it can clear up (I've seen it do this automatically, personally, but I could be wrong). So even if the answer is no, it might not be the answer to the question, has 'git gc' ever been run? -- You received this message because you are subscribed to the Google Groups Git for human beings group. To post to this group, send email to git-us...@googlegroups.com. To unsubscribe from this group, send email to git-users+unsubscr...@googlegroups.comgit-users%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/git-users?hl=en. -- liuhui998 blog http://liuhui998.com -- liuhui998 blog http://liuhui998.com -- You received this message because you are subscribed to the Google Groups Git for human beings group. To post to this group, send email to git-us...@googlegroups.com. To unsubscribe from this group, send email to git-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/git-users?hl=en.
Re: [git-users] Re: git http clone error
:) On Fri, Jul 16, 2010 at 1:27 PM, sudharsan chandrababu meetsudhar...@gmail.com wrote: I solved the problem myself by pushing to repo using git protocol ,by enabling git receive pack. On Jul 10, 1:20 pm, Peter liuhui...@gmail.com wrote: For your situation, using Git:// protocol is fine. But You can't clone from http:// priotocol. Could you use ie to verify your http:// (WebDav) setting? Could you access it buy WebDav protocol, to read and write. If you Couldn't, Maybe there are other errors On Sat, Jul 10, 2010 at 1:13 PM, sudharsan chandrababu meetsudhar...@gmail.com wrote: Ya i am able to see the files and folders inside the repository using web interface ( i mean gitweb) Permission to the repo is 777. Run the cmd: git update-server-info, Still getting the same error, while cloning. Is there anything specially to be done for http accessing. When i googled it says the curl version must be 7.15 and above and i have the updated curl only. Kindly help. On Jul 10, 9:03 am, Peter liuhui...@gmail.com wrote: May be You need check your folders' and files' permission. To see that did you http server permit to access all of your git files. On Fri, Jul 9, 2010 at 10:32 PM, sudharsan chandrababu meetsudhar...@gmail.com wrote: Hi Peter, I really appreciate your immediate response. I have already run the command git-update-server-info more than 10 times in my server and also the hook script (post-update) is enabled. what i notice is whenever i do a git clone the error (warning: remote HEAD refers to nonexistent ref, unable to checkout) comes out. I am able to see the folder which is cloned but without any contents. The .git inside the cloned folder where the /refs/heads/empty there is nothing in it. Hence no contents in the cloned folder. But when i do a clone using git:// i am able to see everything inside the cloned folder. Kindly help as i am new to git. Regards, Darshan On Jul 9, 1:43 pm, Peter liuhui...@gmail.com wrote: maybe you don't execute git update-server-info in server. You can try execute it. :) On Fri, Jul 9, 2010 at 4:14 PM, sudharsan chandrababu meetsudhar...@gmail.com wrote: HI all, Could anyone resolve this problem. Whenever i try to git clone using http protocol i am getting the following error: warning: remote HEAD refers to nonexistent ref, unable to checkout I can view the contents of the repository using gitweb and also the git daemon is working properly. I dont know why i am not able to do a git clone via http, which is possible with git protocol. Its really frustrating me now. Thanks in Advance. -- You received this message because you are subscribed to the Google Groups Git for human beings group. To post to this group, send email to git-us...@googlegroups.com. To unsubscribe from this group, send email to git-users+unsubscr...@googlegroups.com. For more options, visit this group athttp://groups.google.com/group/git-users?hl=en.-Hidequoted text - - Show quoted text - -- You received this message because you are subscribed to the Google Groups Git for human beings group. To post to this group, send email to git-us...@googlegroups.com. To unsubscribe from this group, send email to git-users+unsubscr...@googlegroups.com. For more options, visit this group athttp://groups.google.com/group/git-users?hl=en.-Hide quoted text - - Show quoted text - -- You received this message because you are subscribed to the Google Groups Git for human beings group. To post to this group, send email to git-us...@googlegroups.com. To unsubscribe from this group, send email to git-users+unsubscr...@googlegroups.com. For more options, visit this group athttp://groups.google.com/group/git-users?hl=en.- Hide quoted text - - Show quoted text - -- You received this message because you are subscribed to the Google Groups Git for human beings group. To post to this group, send email to git-us...@googlegroups.com. To unsubscribe from this group, send email to git-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/git-users?hl=en. -- You received this message because you are subscribed to the Google Groups Git for human beings group. To post to this group, send email to git-us...@googlegroups.com. To unsubscribe from this group, send email to git-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/git-users?hl=en.
Re: [git-users] Re: git http clone error
For your situation, using Git:// protocol is fine. But You can't clone from http:// priotocol. Could you use ie to verify your http:// (WebDav) setting? Could you access it buy WebDav protocol, to read and write. If you Couldn't, Maybe there are other errors On Sat, Jul 10, 2010 at 1:13 PM, sudharsan chandrababu meetsudhar...@gmail.com wrote: Ya i am able to see the files and folders inside the repository using web interface ( i mean gitweb) Permission to the repo is 777. Run the cmd: git update-server-info, Still getting the same error, while cloning. Is there anything specially to be done for http accessing. When i googled it says the curl version must be 7.15 and above and i have the updated curl only. Kindly help. On Jul 10, 9:03 am, Peter liuhui...@gmail.com wrote: May be You need check your folders' and files' permission. To see that did you http server permit to access all of your git files. On Fri, Jul 9, 2010 at 10:32 PM, sudharsan chandrababu meetsudhar...@gmail.com wrote: Hi Peter, I really appreciate your immediate response. I have already run the command git-update-server-info more than 10 times in my server and also the hook script (post-update) is enabled. what i notice is whenever i do a git clone the error (warning: remote HEAD refers to nonexistent ref, unable to checkout) comes out. I am able to see the folder which is cloned but without any contents. The .git inside the cloned folder where the /refs/heads/empty there is nothing in it. Hence no contents in the cloned folder. But when i do a clone using git:// i am able to see everything inside the cloned folder. Kindly help as i am new to git. Regards, Darshan On Jul 9, 1:43 pm, Peter liuhui...@gmail.com wrote: maybe you don't execute git update-server-info in server. You can try execute it. :) On Fri, Jul 9, 2010 at 4:14 PM, sudharsan chandrababu meetsudhar...@gmail.com wrote: HI all, Could anyone resolve this problem. Whenever i try to git clone using http protocol i am getting the following error: warning: remote HEAD refers to nonexistent ref, unable to checkout I can view the contents of the repository using gitweb and also the git daemon is working properly. I dont know why i am not able to do a git clone via http, which is possible with git protocol. Its really frustrating me now. Thanks in Advance. -- You received this message because you are subscribed to the Google Groups Git for human beings group. To post to this group, send email to git-us...@googlegroups.com. To unsubscribe from this group, send email to git-users+unsubscr...@googlegroups.com. For more options, visit this group athttp://groups.google.com/group/git-users?hl=en.-Hide quoted text - - Show quoted text - -- You received this message because you are subscribed to the Google Groups Git for human beings group. To post to this group, send email to git-us...@googlegroups.com. To unsubscribe from this group, send email to git-users+unsubscr...@googlegroups.com. For more options, visit this group athttp://groups.google.com/group/git-users?hl=en.- Hide quoted text - - Show quoted text - -- You received this message because you are subscribed to the Google Groups Git for human beings group. To post to this group, send email to git-us...@googlegroups.com. To unsubscribe from this group, send email to git-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/git-users?hl=en. -- You received this message because you are subscribed to the Google Groups Git for human beings group. To post to this group, send email to git-us...@googlegroups.com. To unsubscribe from this group, send email to git-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/git-users?hl=en.
Re: [git-users] Re: git http clone error
May be You need check your folders' and files' permission. To see that did you http server permit to access all of your git files. On Fri, Jul 9, 2010 at 10:32 PM, sudharsan chandrababu meetsudhar...@gmail.com wrote: Hi Peter, I really appreciate your immediate response. I have already run the command git-update-server-info more than 10 times in my server and also the hook script (post-update) is enabled. what i notice is whenever i do a git clone the error (warning: remote HEAD refers to nonexistent ref, unable to checkout) comes out. I am able to see the folder which is cloned but without any contents. The .git inside the cloned folder where the /refs/heads/empty there is nothing in it. Hence no contents in the cloned folder. But when i do a clone using git:// i am able to see everything inside the cloned folder. Kindly help as i am new to git. Regards, Darshan On Jul 9, 1:43 pm, Peter liuhui...@gmail.com wrote: maybe you don't execute git update-server-info in server. You can try execute it. :) On Fri, Jul 9, 2010 at 4:14 PM, sudharsan chandrababu meetsudhar...@gmail.com wrote: HI all, Could anyone resolve this problem. Whenever i try to git clone using http protocol i am getting the following error: warning: remote HEAD refers to nonexistent ref, unable to checkout I can view the contents of the repository using gitweb and also the git daemon is working properly. I dont know why i am not able to do a git clone via http, which is possible with git protocol. Its really frustrating me now. Thanks in Advance. -- You received this message because you are subscribed to the Google Groups Git for human beings group. To post to this group, send email to git-us...@googlegroups.com. To unsubscribe from this group, send email to git-users+unsubscr...@googlegroups.com. For more options, visit this group athttp://groups.google.com/group/git-users?hl=en.- Hide quoted text - - Show quoted text - -- You received this message because you are subscribed to the Google Groups Git for human beings group. To post to this group, send email to git-us...@googlegroups.com. To unsubscribe from this group, send email to git-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/git-users?hl=en. -- You received this message because you are subscribed to the Google Groups Git for human beings group. To post to this group, send email to git-us...@googlegroups.com. To unsubscribe from this group, send email to git-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/git-users?hl=en.
Re: [git-users] Re: Pipe a message into git tag
On Sat, Jun 19, 2010 at 1:55 PM, Trans transf...@gmail.com wrote: LOL. Keeping abreast of the latest in XXX via command line. Love it. ;-) The only problem is, it's hard to appreciate porn on the command line. That's why browsers were invented. :-) -P. -- You received this message because you are subscribed to the Google Groups Git for human beings group. To post to this group, send email to git-us...@googlegroups.com. To unsubscribe from this group, send email to git-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/git-users?hl=en.
Re: [git-users] How do I create a checked out version in the update hook for pre-commit checks
On Fri, Jun 11, 2010 at 5:22 AM, cdamian chris...@damian.net wrote: I try to find a solution to replace subversion with git in our company. One of the requirements we have are extensive checks before a commit can land in the main branch of the central server. Check (or merge, or cherry-pick) your new commits into a test branch. Merge the latest master into the test branch. Run the tests in the test branch. When all is well, merge the test branch back into the master. -P. -- You received this message because you are subscribed to the Google Groups Git for human beings group. To post to this group, send email to git-us...@googlegroups.com. To unsubscribe from this group, send email to git-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/git-users?hl=en.