git

Git Push Questions - Pedantic

I have a master branch and a searchfeature branch in my project. I have pushed the searchfeature branch to the remote repository, all okay so far When I was working on that branch this morning, I did "git push" I got the following: warning: You did not specify any refspecs to push, and the current remote warning: has not configured any...

Repeatedly using git-filter-branch to rewrite new commits

I would like to split out modules distributed with a bigger application into separate submodules and keep the ability to pull from upstream. So this is more complex than Detach subdirectory into separate Git repository. I do not only have do use git-filter-branch once but want to keep the ability to pull upstream changes after I have do...

NetBeans and Java: what to add to version control?

What do I need to add apart from the obvious (src, dist) to my version control system from a NetBeans Java project directory? Can I drop the entire build directory? Should I add the nbproject directory as I'm working on the same project on a different machine as well? I would like to drop at least the build directory because anytime the...

two different versions of a codebase, one heavily commented and one with zero (or minimal) comments

If you have a project where the only difference in the 2 branches are the comments, what is a good workflow (assuming Git, but other ideas are welcome): simply write a hook that strips out comments after each commit and saves the result to a set of files, use only a single branch simply maintain 2 branches other ...

is there a hack for fully functional cross-platform shebang line?

Problem: apparently the scripts in the .git/hooks directory depend on the filename matching one of: post-commit pre-commit pre-rebase etc ... No concept of "file extension" is required because the "shebang line" indicates how the file should run, as long as it is executable and running on your Linux box. The problem is when you have...

git ,,local push'' from feature branch to master, without checkout

Hi. I would like to merge from FeatureBranch to master, without doing ,,checkout master'' first. I've tried (being in FeatureBranch) git push . master but I got (to a degree of surprise) : Everything up-to-date Despite having commits in FeatureBranch which are not (yet) present in master. The reasons why I desire to be able to do...

Checkout past git submodule commit

I am working on a project where there are a number of submodules. Yesterday, everything was peachy, app was running, etc. After I ran git submodules update this morning, I receive an error in the application. $ git submodule update Submodule path 'vendor/plugins/pluginA': checked out '49d5cba84dcffc061db69813162d103feef31ecb' Submodule ...

git ls-files problem: howto identify new files (added, not commited)?

After I called git add <file> the command git status will show me something like: ... new file: <file> Somehow I can't manage it to get the same information by using ls-files, it (ls-files -tc in this case) will show me: H <commited file> H <other commited file> H <file> There seems no commandline switch to exist for new files. ...

Branches have apparently diverged, but commit history is identical

git status tells me that my branch and the one I started from on another repository have diverged: # On branch master # Your branch and 'origin/master' have diverged, # and have 13 and 13 different commit(s) each, respectively. but the commit history for each is identical. That is, git log shows the same commits, in the same order, w...

Using remote version control (VCS) commands on the local filesystem without a VCS client

Supposing I have two machines setup: Client Let's assume a windows box Let's assume this is a dev box, so all of the files to be put under source control will be here Let's assume no source control installed here Server Let's assume a linux box Let's assume Git is the source control of choice (installed) SSH enabled Question: Is...

How to automatically merge modifications in multiple projects ?

Hi, I'm working on a Ruby on Rails (3 beta) project which is basically a simple back-office with users, contents and localizations. This back-office will be our start for all news projects. However this base isn't perfect and might be widely improved. So i would like to keep improving this base during the development of the new proje...

Trimming GIT Checkins/Squashing GIT History

I check my code into a GIT branch every few minutes or so, and the comments end up being things like "Everything broken starting again" and other absurdities. Then every few minutes/hours/days I do a serious checkin with a real comment like, "Fixed bug #22.55, 3rd time." How can I separate these two concepts? I would like to be able to ...

Git merge -s theirs: Simply?

I have checked out the various questions on this. The first provides a huge question and answer (relevant? not sure) and the second provides a wrong answer as best answer. I have a branch called great-use-this. I have another branch called master. I want to merge great-use-this into master, and avoid auto-merging conflicts. What is th...

Git setup remote tracking branch

I want to track a remote master branch from a new remote repository. Both do already exist. How do I go about this in git? I can't seem to get it right. I tried: git remote add otherRepo git://... git branch -t myTrack otherRepo/master However, I get the following error: fatal: Not a valid object name: 'otherRepo/master'. ...

What is git head, exactly?

You see the Git documentation saying things like "The branch must be fully merged in HEAD". But what is Git HEAD, exactly? ...

How do you copy and paste into Git Bash

I'm using msysgit running on Windows XP. Tried Ctrl+V, Right click, Middle click, google... no luck. ...

svnadmin dump in git

I'm in the process of moving a bunch of my work from personal SVN repo's to git repo's. I've had a cron job setup that runs svnadmin dump every night on all my repos into a remote folder. Is there similar functionality in git? Also, I don't fully understand git, so this logic is most likely wrong, but I kept all my svn repos under a sin...

How to customize which terminal is used by the "Git Bash Here" command of msysgit's shell extension?

The title says it all. The default cmd.exe is horrible, I'd like to use, say, the "Console" shell. ...

hg equivalent of git notes

Is there a command in mercurial, that works like git notes? ...

How do i clone svn repo on specific port.

I'm using msysgit on windows on old repo i had no problems with this command git svn clone -s --username=XXX https://URL but repo has moved and now the url is like that: svn://URL:port how can i set this port number ? using git svn clone svn://URL:port results with 'mkdir ... not a directory' error, and without port it can't find ...