Re: [git-users] how to test git branch ? Can I test a branch in the browser address bar ?
On Sun, 5 Oct 2014 09:03:49 -0700 (PDT) Oliur Chowdhury o.r.chowdh...@gmail.com wrote: Hi, this is a more of a guidance question: I've a local git repo which I then push to public_html/stage in siteground server. for each feature or bug issue I create a different branch and merge it with the master branch. I then push it to the server. I want to know if there is anyway I can test different branches in the browser url just like i can test the master branch. So, if I go to http://stage.tista.co.uk/ I can see the magento installation (which is my master branch). Is there a way I can also check different branches under the stage repo by going to a url? I did some googling but I didn't find anything. I need a way to test the feature/bug branches to make sure it works before merging them with the master or pushing it to live. thanks There's no way to do the testing you want using Git alone. Here's why: when your browser performs an HTTP request, the web server reads files located in the so-called work tree of your server-side Git repository. The work tree contains files as they are recorded in a certain commit available in the repository (typically it's just the tip commit of a certain branch). Populating the work tree is called checking out (that's why it's done using `git checkout`) and hence the work tree is commonly called the checkout as well. Hence the work tree can be thought of as a view to a certain commit in the repository's history -- available for direct inspection/consumption. When your web server accesses the files in your work tree, it just accesses the file system -- it does not know anything about Git and does not call to it in any way. As you can see, in a non-bare Git repository (that is, a repository which has a work tree attached to it), there exists only a single work tree, and the only way to see the state of the project as recorede in another commit (say, the tip commit of another branch) is to check out that branch to the work tree. So what you can do about this? I'm not much into web development myself but I think I can offer a bit of advice anyway -- may be it sparks some idea in your head. 1) Have multiple work trees attached to the same repository, and have them available to the webserver via different vhosts of different pathname prefixes in the same vhost's URI. This is most easily done using the git-new-worktree script in the contrib section of Git sources. You could then automate your deployment using server repo's hooks to automatically check out tip commits of, say, master and devel in two work trees created beforehand. 2) Write a simple CGI script which would be accessible via that same web server and which would perform `git checkout` to the commit you tell it via a form provided by that CGI script. (1) Requires more work up front but simplified side-by-side testing while (2) requires less work up front but side-by-side testing is more tedious (requires work tree updating when switching). Also note that Git itself is not a deployment tool. Magento heavily relies on its database so only trivial changes are testable w/o messing with the database when you're updating the staging server. -- 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 remote repository gets stuck at old change until repack
Hi, I wrote about having a stuck server a while back, and now have new information. I have a remote GIT HTTP server at http://git.algoram.com/dvs/ I created it with git init --bare --group and then pushed from my development system. I serve this with nginx. After I commit and push a new change, a git clone or git pull of the remote repository won't get it, the remote repository appears to be stuck at the previous change from the HTTP side, but I can see the change log entry while logged into the system. If I run git repack on the remote server, then git clone and git pull will get the new change, but the remote repository is stuck at that new change despite any subsequent pushes, until I repack it again. So, I have a work-around by running git repack, but would like to fix the problem. Nginx runs as user www-data. I tried to see if this was a permission problem by using su www-data on the system, and I can still see the change log entry. Thanks Bruce -- 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] Files are commiting without staging
Greetings, Just installed git on my laptop that has Window XP OS so git runs under mingw. I added some files, and committed them. Then I modified two of them using vi and saved them but did git add on only one of them. Commit accepted bpth. From reading the Atlassian tutorial I got the impression that files needed to be staged before commit will pick them up. At work we use sourceTree and anything not staged does not get committed. Is there some config setting that causes my modified files to be staged automatically? thanks, jh -- 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 send-email does not work for google two step verification
The git send-email app does not seem to work for google two step verfication. It creates a lot of issues, even with giving an app specific password. Moreover if I store the password in the git config file then it is more vulnerable than before because the config file is stored in plain text and anyone with access to the config file can access my account without any limitations. -- 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] Updating multiple subtrees in a repository
Hi all, Does anyone know if it's possible to do a git subtree pull for all subtrees in the repository? I can do this via CMake, but it would be handy to have this in git (although maybe this is going beyond what git should be expected to do). Thanks, Carl -- 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.