[git-users] Submodul with push
Hello, I have got a large project and configure some Git submodules and include them into the main project: mainproject |submodul 1 |submodul 2 The submodule are based on a unique commit (hash). My question is, can I clone the main project recursive with the submodules and push changes on the submodul into the submodul repo and update the commit hash in the main project in one shot? In short: git clone --recursive myproject cd mainproject cd submodul1 touch test.txt git add . git commit git push so the test.txt file will be commited and pushed into the submodul1 Thanks a lot Phil -- 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] change encoding and text replace
Hello, can I use gitattributes for change the encoding of text file? I would like to encode all text file with UTF-8 and replace the \t to 4 spaces. How can I do this? Thanks Phil -- 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] change encoding and text replace
Hello, thanks for your answer. Am Mittwoch, 5. Februar 2014 15:29:14 UTC+1 schrieb Konstantin Khomoutov: Any sensible text editor these days supports it. It might require certain tweaking but writing a Git filter is way more pain in the neck. It is more a social problem and I don't want to fix encoding errors manually. Mostly user does not configurate their editors correct and I get after a commit encoding errors within the files, so I would like to convert it automatically by git, in a best view OS independed. Thanks a lot Phil -- 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] change encoding and text replace
Am Mittwoch, 5. Februar 2014 21:55:30 UTC+1 schrieb Huu Da Tran: On Wednesday, February 5, 2014 9:59:30 AM UTC-5, Philipp Kraus wrote: It is more a social problem and I don't want to fix encoding errors manually. Mostly user does not configurate their editors correct and I get after a commit encoding errors within the files, so I would like to convert it automatically by git, in a best view OS independed. For social issues, just reject the commit? Okay, so you would like to create a pre-push hook and check the file encoding? Phil -- 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] hook file encoding for text files
Hello, I try to write a pre-push hook in a bare repo. I would like to check the file encoding on all text files, so how can I get all file types that are handled as text file from git. I have defined some types in the gitattributes. Hope for some help, thanks Phil -- 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: ignore files with hard definition
Am Freitag, 31. Januar 2014 10:28:21 UTC+1 schrieb Thomas Ferris Nicolaisen: I think the best way is to keep a clear and well-made .gitignore file, and foster a culture that respects not changing it without good reason. Hard constraints on contributors are usually counter-productive in the long run. You are right, but the problem is, that on errors the first try is, to modify the file, which creates the block, the error isn't be fixed. -- 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 change for tracked / untracked files
Hello, sorry for the late answer. Am Mittwoch, 22. Januar 2014 21:27:18 UTC+1 schrieb Magnus Therning: I'm not 100% sure I understand what you wish to do, but you might want to look at `git clean`. By default it just lists the files it would delete, you have to pass it '-f' to actually remove stuff. You can also control whether you want it to deal with ignored files or not. I'm using gitignore like a black list, so my git ignore defines all files which are not allowed. If I switch this to a white list, I need a check if everything is all right. git clean works only with untracked files, but in my case I have got tracked files, which can be after the gitignore changing also ignored. Did you have got an idea, in which way I can change my gitignores, so that I do not forget some files? Phil -- 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] ignore files with hard definition
Hello, can I define on my server repository, that the ignored file patterns are hard defined. My problem is, that each use can modify the gitignore, but I get with this modification files into the server repo, which should not be there, so I would like to define in the server (bare) repo files patterns, which should be never pushed into the repo. I would like to do this with a hook, check the pushed filelist and reject the push, if some filepattern is found Is this the correct way or is there a better solution? Philipp -- 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] rebase remove ignored files
Hello, I have got a large Git repo, but on beginning there wasn't a gitignore file, so during the time there are a lot of (binary) files which are stored in the repository. I have add these files to a gitignore and run git rm to remove them, but can I rebase the repo, so that these files are also removed from the history? I will shrink the repo size. Thanks Phil -- 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] rebase remove ignored files
Am Mittwoch, 22. Januar 2014 11:16:31 UTC+1 schrieb Magnus Therning: On Wed, Jan 22, 2014 at 9:36 AM, Philipp Kraus philip...@flashpixx.de javascript: wrote: Hello, I have got a large Git repo, but on beginning there wasn't a gitignore file, so during the time there are a lot of (binary) files which are stored in the repository. I have add these files to a gitignore and run git rm to remove them, but can I rebase the repo, so that these files are also removed from the history? I will shrink the repo size. What you are asking for is a way to rewrite history, and if you search for it you'll find several good resources on how to use `git filter-branch` which is the command you are looking for. Thanks, seems to be my mistake. I have searched for rebase and not filter branch. Phil -- 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] invert gitignore
Thanks greate, works well Am Dienstag, 22. Oktober 2013 16:43:07 UTC+2 schrieb Dale Worley: You write something like this: * !*.cpp The first rule means that all files are to be ignored. (You might have to add .*, I forget whether an initial . is matched by *.) The second overrides the first, meaning to not ignore files that match *.cpp. The first rule must be .* -- 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] invert gitignore
Hello, I use my .gitignore to define files which should not store in the history, but can I use an invert filter? So I would define files, which are only stored in the history. So if I write to the (not)ignore file *.cpp all other file except *.cpp are ignored? So I need the invert / complement definition of gitignore Thanks Phil -- 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] SVN Git
Hello, I would like to use Git with a SVN, so I try to clone the SVN repo with git svn clone svn://myserver, it is a repo without trunk etc. Git reports the error Couldn't find a repository. The SVN repo uses an authentification (username password) and a normal svn checkout works well. How can I use the SVN repo with Git? Thanks Phil -- 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: git pull username password prompt
Am Sonntag, 13. Januar 2013 13:32:10 UTC+1 schrieb Thomas Ferris Nicolaisen: Could it be that Apache (or whatever webserver you use) is not correctly configured? Please post the details of your environment along with the Apache configuration. I don't think so, I have used the description from http://www.kernel.org/pub/software/scm/git/docs/git-http-backend.html and I have modified the configuration a little bit, so that I can use it with an Apache macro Macro GitAuthPush $rep LocationMatch ^/git/$rep/git-receive-pack$ AuthType Basic Require valid-user AuthName $rep Repository AuthUserFile /git/access.$rep /LocationMatch /Macro Macro GitAuthBoth $rep LocationMatch ^/git/$rep/git-(upload|receive)-pack$ AuthType Basic Require valid-user AuthName $rep Repository AuthUserFile /git/access.$rep /LocationMatch /Macro The main Git repo configuration shows: SetEnv REMOTE_USER REDIRECT_REMOTE_USER SetEnv GIT_PROJECT_ROOT /git/repository SetEnv GIT_HTTP_EXPORT_ALL Directory /usr/lib/git-core/ Files git-http-backend Options ExecCGI Includes SetHandler cgi-script AcceptPathInfo On /Files /Directory ScriptAliasMatch \ (?x)^/git/(.*/(HEAD | \ info/refs | \ objects/(info/[^/]+ | \ [0-9a-f]{2}/[0-9a-f]{38} | \ pack/pack-[0-9a-f]{40}\.(pack|idx)) | \ git-(upload|receive)-pack))$ \ /usr/lib/git-core/git-http-backend/$1 After this I use the use call for create a macro call. I don't see an error in my configuration. Do you have an idea to solve the problem or do you see an error in my configuration Thanks --
[git-users] git pull username password prompt
Hello, I'm using HTTPS (smart-http) for push/pull data to a Git repo. On push the Git client prompts for username and password, after inserting the data will be send. On pulling I must set the origin URL to https://username:password@myserver/my.git, if I remove the username:password@ prefix the Git client creates a 401 error (authentification error). Can I tell the Git client (Linux OSX), that it should prompt on each push and pull for username and password? I wouldn't like to store the username and password within the .git/config file. Thanks Phil --
Re: [git-users] git clone problem with authentification
Am Dienstag, 4. Dezember 2012 09:18:13 UTC+1 schrieb Konstantin Khomoutov: Your ScriptAliasMatch directive seems to match the URL mentioned in the failing POST request, hence I, personally, can only suspect a problem with configuration for the authentication, which you did not include in your message. git-{upload|receive}-pack do not do any authentication themselves, they just look at the REMOTE_USER environment variable which is supplied by the web server, and contains the identity of the authenticated user. So the problem should (supposedly) root in the web server configuration. Sorry, I have forgot this lines for the authentification, so: LocationMatch ^/git/myrepo/git-(upload|receive)-pack$ AuthType Basic Require valid-user AuthName Repository AuthUserFile /access.myrep /LocationMatch Authentification is Apache part, but the 401 error is only exists on git clone, so I don't understand the problem, because the ScriptAliasMatch must also match on push or pull and then it works Phil --
[git-users] git clone problem with authentification
Hello, I have run some bare repos with http https on Apache and get this errors: GET /git/Simulation.git/info/refs?service=git-upload-pack HTTP/1.1 200 2878 - git/1.8.0 POST /git/Simulation.git/git-upload-pack HTTP/1.1 401 901 - git/1.8.0 In my Apache config I have set this values: SetEnv REMOTE_USER REDIRECT_REMOTE_USER SetEnv GIT_PROJECT_ROOT /myrepodir SetEnv GIT_HTTP_EXPORT_ALL Directory /usr/lib/git-core/ Files git-http-backend Options ExecCGI Includes SetHandler cgi-script AcceptPathInfo On /Files /Directory ScriptAliasMatch \ (?x)^/git/(.*/(HEAD | \ info/refs | \ objects/(info/[^/]+ | \ [0-9a-f]{2}/[0-9a-f]{38} | \ pack/pack-[0-9a-f]{40}\.(pack|idx)) | \ git-(upload|receive)-pack))$ \ /usr/lib/git-core/git-http-backend/$1 Only the clone option does not work, push / pull works fine with authentification. Does anybody know how I can solve this problem? Thanks Phil --
[git-users] git checkout-index unable to create file (permission denied) on some files
Hello, I'm running a PHP script which pulls checkouts a Git repo. The script clones first the repo and on each next call it should get all new changes (git clone and than git pull). Sometime I get the message: git checkout-index unable to create file (permission denied) exspecially on the .gitignore files. The webserver run the script and the file / directory owner is the webserver, also of the .gitignore files, so the message permission denied is wrong. I don't understand why the git client create this message and this problem. The PHP script checks first if the directory exists, if not, it runs git clone, if it exists it calls git --git-dir=repodir pull. Can I setup a flag to the git client, that it should only overwrite all files, so that the error is not shown? Thanks Phil -- 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/-/1a96AGdPh8IJ. To post to this group, send email to git-users@googlegroups.com. To unsubscribe from this group, send email to git-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/git-users?hl=en.
[git-users] Re: git hook with version string
Thanks for your answer Am Sonntag, 28. Oktober 2012 12:50:15 UTC+1 schrieb Thomas Ferris Nicolaisen: This reminds me of a similar but related question: How can we get SVN's keyword substitution in Git. The short answer is: you can't. But when you think about it, this file you want to create is actually just duplicating information which exists elsewhere. The right way to go about it is to find some step in your build/deployment mechanism, and create this file on the fly. We build our products using Maven and Gradle, and both these build-tools have places where we can hook in and generate a version.txt file with interesting information from Git. I think it is not a real keyword subsitution, because Git does not store any information about numbering or anything else. In my depolyment process it should be used for creating the documentation, so I need the date of the checkout and the branch / tag name. This information are in the repo all time, so I need only to push them into a code file on the checkout. Another way is to create it on checkout, as suggested in the git-scm.combook: From http://git-scm.com/book/ch7-2.html: SVN- or CVS-style keyword expansion is often requested by developers used to those systems. The main problem with this in Git is that you can’t modify a file with information about the commit after you’ve committed, because Git checksums the file first. However, you can inject text into a file when it’s checked out and remove it again before it’s added to a commit. Git attributes offers you two ways to do this.[...] I have read this chapter and I don't want modify the file on commiting. I have a central repo in which each local repo is pushed, the documentation is created on the server. I have create a post-received hook for doing this, but I would like to add some information of the actually code before the documentation is created -- 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/-/tyOHAVfooZcJ. 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.