[git-users] How to use git for web site development
Hello, What are rules to follow when you plant to use git for developing a web site? Firstly I tried to create lots of branches for each part of a web site (index, authentication, member page) but soon I faced lots of problems: 1) What I should do with database which is continuously modified over time (should I upload it to git)? 2) Should I use single or multiple branches for separate pages (index, authentication and member pages)? 3) How can I automatically deploy web site if it contains database's and mail gateway's credentials? It's a bit easier to use git when you already have a web site. In that case we simply create new branch for each update. I guess there are no unique solution for my case and each and every person finds its own way to use git but any suggestion/sharing experience will be highly appropriated Thanks in advance Yehuda Katz p.s. I do not use frameworks during web site development process -- 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] question about merge commits
This happens depending on how the history of the repos has diverged. Basically when you make a pull you are doing a fetch and a merge in the background. So there are two types of merges, one of them ends with a commit merge the other don't. It's better explained in https://git-scm.com/book/en/v2/Git-Branching-Basic-Branching-and-Merging El mié, jul 1, 2015 08:10, Amr Elhosiny eng.amr2...@gmail.com escribió: Guys, I have a question about merge commits. Now when I perform git pull from somebody. Sometimes I'm getting a merge commit where I should write a merge commit message. Sometimes it does not happen, I just hit the git pull and it pulls the updates without creating a merge commit. What is the difference ? note that the files modified in the new commit -when getting a merge commit- are only maintained by a single user. And how can I avoid these merge commits as long as the file is maintained by one user ? 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. -- 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 diff problem with cvs $id$
I have two branches and the only difference between them is the cvs $id$, which is expanded in one branch and not expanded in the other. Is there a way to show git diff as unchanged? Also should not show conflict in case of git merge. Any suggestions? -- 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] question about merge commits
Guys, I have a question about merge commits. Now when I perform git pull from somebody. Sometimes I'm getting a merge commit where I should write a merge commit message. Sometimes it does not happen, I just hit the git pull and it pulls the updates without creating a merge commit. What is the difference ? note that the files modified in the new commit -when getting a merge commit- are only maintained by a single user. And how can I avoid these merge commits as long as the file is maintained by one user ? 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] Keeping history migrating .java to .scala
I want to migrate some legacy java code to scala whilst keeping git history intact for each file. The idea was to do a very basic conversion first, just doing ssyntactical changes first and have git mark it only as a rename and go from there. But already the basic syntax changes push git over the similarity edge, so now II have a deleted file, and a new file. My understanding is then that I basically loose history as I don't see the full history of the new file. `git log --follow file` doesn't work. Can I mark file changes manually as a rename? Are there different approaches? Cheers, Oliver -- 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] Keeping history migrating .java to .scala
On Wed, 1 Jul 2015 07:49:45 -0700 (PDT) Oliver Schrenk oliver.schr...@gmail.com wrote: I want to migrate some legacy java code to scala whilst keeping git history intact for each file. The idea was to do a very basic conversion first, just doing ssyntactical changes first and have git mark it only as a rename and go from there. Do I understand correctly that conversion also implies explicit renaming of files (like changing their extension from .java to .scala or something like this)? But already the basic syntax changes push git over the similarity edge, so now II have a deleted file, and a new file. My understanding is then that I basically loose history as I don't see the full history of the new file. `git log --follow file` doesn't work. Does `git log --follow -M5% path/to/that/file/name` help? By default, Git uses the similarity threshold of 50% when it tries to detect file rename, so by tweaking this parameter you could make it more happy with your changes. Can I mark file changes manually as a rename? No, you can't. What `git commit` shows you as a rename is just a heuristic intended to aesthetically please the user -- it's not recorded in the repository as such in any way. Each commit in a Git repository references a single tree object, which references blob objects representing its files and other tree objects representing its subdirectories, and so on. Tree objects contain short (relative) names for their entries and have no idea about tree objects representing the same directory in past commits. Are there different approaches? Well, one working different approach is to adopt the Git's approach to your changes rather than trying to go against the grain. In [1], the creator of Git explains in detail why Git implements the model which does not explicitly track files but rather considers them as mere blobs forming the project as a whole (which is a tracking unit in Git). (The bottom line of that explanation is that the reference project for Git -- which is Linux -- could not live with rename tracking, and so it's absent.) You will certainly not lose history as it will be available via the regular parent/child relations of the commits in your repository. Now you're maintaining the file-based mental model and hence obviously what you're facing now is a problem. If you will change your mental model to consider your whole project as a tracking unit, your history is all there again. Please understand that I'm not here to claim that being able to do `git log -- path/to/file` is worthless but from personal experience I know that indeed obviously it works only for stabilized files, which receive only small amounts of changes per commit. On the other hand, the -S and -R options to `git log` provide you with a powerful tool for a larger scale. And so does `git grep` with its ability to search through a given commit. May be those will be enough to make you cope with the situation without trying to fight Git. ;-) 1. http://thread.gmane.org/gmane.comp.version-control.git/27/focus=217 -- You received this message because you are subscribed to the Google Groups Git for human beings group. To unsubscribe from this group and stop receiving emails from it, send an email to git-users+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: [git-users] How to use git for web site development
See my two cents inline On 1 Jul 2015 20:01, m...@joketube.tv wrote: Hello, What are rules to follow when you plant to use git for developing a web site? Firstly I tried to create lots of branches for each part of a web site (index, authentication, member page) but soon I faced lots of problems: 1) What I should do with database which is continuously modified over time (should I upload it to git)? Tracking database content with Git doesn't seem to be a good idea. What you may need instead is schema migrations, e.g. track the file containing queries necessary for adding storage space for the new features 2) Should I use single or multiple branches for separate pages (index, authentication and member pages)? I don't think so. There are many approaches here, e.g. you may want to stick to the development model you already mentioned: one branch for every feature. But even that may be unnecessary, depending on your workflow. 3) How can I automatically deploy web site if it contains database's and mail gateway's credentials? First things first: Git is not a deployment tool. There are many deployment tools out there that can utilize Git, though. Also, storing different credentials in the repository is usually a bad idea, especially if your repository is public (e.g. hosted on GitHub). You may want to create a default config file with your development server credentials, and at the end of this file include an untracked config which overwrites the necessary values. It's a bit easier to use git when you already have a web site. In that case we simply create new branch for each update. I guess there are no unique solution for my case and each and every person finds its own way to use git but any suggestion/sharing experience will be highly appropriated Thanks in advance Yehuda Katz p.s. I do not use frameworks during web site development process -- You received this message because you are subscribed to the Google Groups Git for human beings group. To unsubscribe from this group and stop receiving emails from it, send an email to git-users+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout. -- You received this message because you are subscribed to the Google Groups Git for human beings group. To unsubscribe from this group and stop receiving emails from it, send an email to git-users+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[git-users] Why commit --fixup uses commit message instead SHA of original commit in resulting commit message?
Let i have these commits: * task #2850 * task #2850 - #2961 Then i fixuping last commit: git commit --fixup= * bfbfbfbf fixup! task #2850 * task #2850 * task #2850 - #2961 And I perform interactive rebase. Result will be: * p task #2850 * f bfbfbfbf fixup! task #2850 * p task #2850 - #2961 Fixup plased after wrong commit. Yes, this behavior is documentated: git rebase -i --autosquash places fixup|squash commits after a commit whose title begins with the same …. (see rebase options --autosquashdescription) But why commit --fixup make this? Why not use SHA in fixup commit message like this? git commit --fixup= * bfbfbfbf fixup! * task #2850 * task #2850 - #2961 And I perform interactive rebase. Result will be: * f bfbfbfbf fixup! * p task #2850 * p task #2850 - #2961 And it is what i expect. So, using commit message by default in creating fixup commits is trustless. May be there is an option to use SHAs instead commit messages? I dont found it. 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.