My OS is: Windows 7 Ultimate and IDE is Netbeans. Want to work with 2-3 devs on PHP projects. After research I found that it's possible with GIT. Found this solution. But it's installing apache server. (I don't need any web server: I already have one - IIS7). Is there any free solution (I mean not only GIT, maybe something else) that will work with Netbeans and allows to work with group of developers?
If I maintain different git repo for different OS platform, the fix I make for one OS platform has to be replicated to other platform.
I am wondering if there is known good approach in dealing with this type of problem.
Thanks in advance.
I have a web application that I would like to bring under version control using git. I have done this on the server with several other sites using the following strategy.
$ mkdir /var/git/example.git && cd /var/git/example.git
$ git init --bare
$ cat > hooks/post-receive
#!/bin/sh
GIT_WORK_TREE=/var/www/example.com git checkout -f
$ chmod +x hooks/post-receive
.... add files, commit, push, yada yada
The process works fine whenever I have done it in the past, but for this new site there is a new wrinkle for me. This new site generates files and stores them in a directory. The directory is writeable by the webroot. Let's call that directory:
/var/www/example.com/generatedfiles/
My concern is that the checkout -f will delete this directory and I will lose all the generated content. I also don't want that content in my git repository.
So, my question is how can I setup my post-receive hook so that it leaves the generatedfiles directory alone, but I still get the effectiveness of checkout -f?
I have a legacy CVS repository that I want to convert to git. I've used cvs2svn to do a test conversion and ran into an issue I'm not sure how to resolve.
The problem is that only some directories in the CVS repo are branched. Some common directories (including the root project directory and Makefile) are always left on HEAD. This looks something like:
project/Makefile # always on HEAD
project/bar/ # HEAD, Release_01, Release_02, etc
project/config/ # always on HEAD
project/foo/ # HEAD, Release_01, Release_02, etc
project/Makerules/ # always on HEAD
project/Makerules/Release_01 # always on HEAD, defines branches for Release_01 among other things
project/Makerules/Release_02 # always on HEAD, defines branches for Release_02 among other things
When I run a cvs2svn conversion (with the git output option) I get all the right branches, but the shared "always on HEAD" files are missing. These files should instead be present with the contents they had on HEAD at the time of the branch commit.
I'm not sure if it helps or not, but official builds made on any branch tag all of the files used in the build with a monotonically increasing build number (that is, build_123 is a tag that includes a bunch of files from HEAD, and build_124 is a Release_01 build that includes a mix of files from HEAD and the Release_01 branch, and build_125 is back to all HEAD files).
I see three possible ways to approach this:
some combinations of options and/or custom code for the cvs2svn step to fill each non-HEAD branch with the files that existed on HEAD at the time of the revision
some sort of post-processing of the cvs2svn output before the import into git
use git-filter-branch to re-write the git history after the import into git
Am I missing an easy solution? Should I just accept the imperfect import and move on? There is only one active branch (other than HEAD) right now, but it would be useful to have a full and accurate history to refer too.
I made a huge mistake that resulted in my having a local version of my project that is no longer connected with the remote repository it was once associated with. Is there some trick to reestablishing that connection/association w/o blowing away the local version of the code?
I have a git server where my project reside, I have a laptop that I often work on, a work computer that I use a lot and a desktop at home. The general GIT workflow I have no problem with (branching, merging, tagging etc.), but how do I make sure that I don't have any changes laying on one of the computers when I start working on another one? All the computers has my project cloned, but rarely do I have a change worth commiting when I have to leave the computer. To deal with this I have a tendency to just push a commit I call "Save" with all my small unrelated file changes every time I'm done working. Then I do a pull when I start working on another computer.
This seems like a hacky solution though and I have a feeling certain people would punch me in the face if they saw how I was using GIT. I just can't see any alternatives to this short of carrying only one checkout of my project around on a thumb drive.
So I ask you professionals: How do you deal with working with multiple clones of a project on different computers?
Examples
A thumb drive with only one clone of the project?
Somehow making temporary commits that you pull and delete later?
Some clever "save" branch that is used for this purpose only?
Does GIT perhaps have support for this issue built-in? Online stashing?
etc...
I am using SubSonic 3 with stored procedures... I have found that when invoking ExecuteTypedList the return code of the procedure is not parsed and therefor always null. I grabbed a copy of the source from Git and found that the output parameters are not parsed when ExecuteReader is called. I have made a slight change to the source I downloaded and the return code appears to be available now for calls to ExecuteTypedList. (will follow the GIT video for forking and submitting a pull request eventually)
Now for my question. I'd like to run the unit tests included with the source to see if my proposed change will break any other tests (I have a narrow view of Subsonic as a whole with MSSql and sprocs as my primary focus right now.) I have xUnit integrated with ReSharper 6.1 now in VS 2010, and can run the Subsonic.Tests.Unit project, but the Subsonic.Tests project all seem to fail dealing with the integrated login to the SQLExpress databases, missing MySQL, etc...
Is there a document somewhere that talks about setting up a machine for running all the unit tests against the various databases? Am I trying to go too far?
I need a solution that I can deploy php application to a webserver using ant and git. I need to copy the files to the webserver and run a php script which setup the database.
I was thinking about using sshexec to run commands which will update the files and run the php script
<target name="deploy">
<sshexec host="host"
port="22"
username="user"
password="****"
trust="true"
command="..."/>
</target>
Does anyone has the complete solution? or even a better solution?
When I push from my local machine to my remote repo with git it gives no errors.
It counts the objects, compresses them and says: 'master > master'.
But when I check my remote repo i only see the new branch, there no new files added to the directory.
When I try to switch to that branch on the remote server with 'git checkout master' it says iam not in a working tree.
Can anybody help me?
Thanks
PS: The remote repo is initalized with: 'git init'
Yesterday and for about months I was able to push/commit. But since few hours ago I cannot commit and push in my own private repository anymore. I have 2 new collaborator, and they have same problem as me.
How to resolve this?
tried pulling before push
tried commit and it always says local conflict need to be resolved
Then i resolved local conflict and accepted all
Again it says push failed which is annoying error all the time now
Everytime it says hat follow result.
==[IDE]== Feb 7, 2012 11:33:21 AM Pushing
git push git@github.com:a/b.git +refs/heads/master:refs/heads/master
git push git@github.com:a/b.git +refs/heads/master:refs/heads/master
Remote Repository Updates
Branch : master
Old Id : f3b00695638eec
New Id : c79bc1a4650
Result : REJECTED_NONFASTFORWARD
Local Repository Updates
Branch : origin/master
Old Id : f3b00695
New Id : c79bc1a4650e02
Result : NOT_ATTEMPTED
==[IDE]== Feb 7, 2012 11:34:34 AM Pushing finished.
Normally drupal.org inserts version information when a project is packaged. Git repositories do not contain this information. Git Deploy hooks into the Drupal update system and attempts to provide the version of modules and themes checked out of git.
It often happens that while working on one project, you need to use another project from within it. Perhaps it’s a library that a third party developed or that you’re developing separately and using in multiple parent projects. A common issue arises in these scenarios: you want to be able to treat the two projects as separate yet still be able to use one from within the other.
dvcs-autosync is a project to create an open source replacement for Dropbox/Wuala/Box.net/etc. based on distributed version control systems (DVCS). It offers nearly instantaneous mutual updates when a file is added or changed on one side but with the added benefit of (local, distributed) versioning and that it does not rely on a centralized service provider, but can be used with any DVCS hosting option including a completely separate server - your data remains your own.
Sometimes you run commands that are a little complicated or just too long to write. Git has support for command aliases that are very easy to set up. Some people like the short form of many VCS commands: co instead of checkout, ci instead of commit, di instead of diff, etc. On the face of [...]
Do you ever find it difficult figuring out complex merges? “Wait, was my change the part after the <<<<<<< or before the >>>>>>> ?”, “What did I do here and what did they do?”, “Oh my gawd, was this whole file modified?!?” If you find yourself asking these questions, maybe you need to use git [...]
Wouldn’t it be great if you could find all the changes to a line in your entire history? Sort of like git blame, but only for revisions that match some string. This is where git’s pickaxe functionality comes in. git log, git diff, and git format-patch all can use the pickaxe. To use the pickaxe, [...]
Wouldn’t it be great if git had a revision number that always went up so that you could look at two of them and figure out which one was later than the other? svn, cvs, hg all have numeric commits that you can refer to, so why can’t git? It turns out that git does, [...]
While I really enjoy qgit for visualizing history, it is a graphical client. Sometimes you’re on a remote machine or want to look at a very complicated set of commits. In those cases, git show-branch might not be enough. Enter tig. Tig is best described as a graphical history viewer in ncurses. It lets you [...]
Sometimes you just want a few patches from a topic branch, not the entire thing. If a bug fix was implemented that would help everyone working out of the master branch, but the rest of the topic branch isn’t acceptable, git cherry-pick is the way to go. The basic usage for git cherry-pick is git [...]
What if you wanted to see all the revisions since a branch was created? Or all the changes included in two or more branches? Or all the changes in one branch, that has merges from another branch, but not the merges or the other branch? All of this and more can be done with git [...]
“What? I already fixed this bug! Why is it still happening?” If you don’t have a good test suite or you don’t run it regularly, finding these sorts of regressions can be difficult. Because git makes it really easy to jump to other commits (branches or history), it is very easy to narrow down what [...]
Imagine you’re an integrator (someone who takes a lot of changes from other people and merges them) and you often merge other people’s branches, resolve conflicts, and then find bugs in the branch. Wouldn’t it be great if git could remember your conflict resolutions and replay them next time you try to merge? That’s what [...]
What do you do when you have two commits in the past that you want to re-arrange? or combine? or completely obliterate? What about after you’ve created patches, emailed them to a maintainer, and that maintainer has accepted some of them into the official repo? What if you realize that your topic branch actually has [...]
howto/vcs/git.txt · Zuletzt geändert: 2011/01/04 10:02 von hinnerk