How can you git-checkout without overwriting the data?
I run
git checkout master
I get
error: Entry 'forms/answer.php' would be overwritten by merge. Cannot merge.
This is surprising, since I did not know that Git merges when I git-checkout.
I have always run after the command separately git merge new-feature.
This seems to be ...
I'm puzzled how to use branches in git to save temporary work.
This is what I tried:
/tmp/gt > git init
Initialized empty Git repository in .git/
/tmp/gt > date > t
/tmp/gt > git add t
/tmp/gt > git commit -m 'initial'
Created initial commit b722fde: initial
1 files changed, 1 insertions(+), 0 deletions(-)
create mode 100644 t
Now ...
I'm moving a project from SVN to git (completely, so no need for git svn's SVN interop features) and I've tried using both git svn and svn2git (nirvdrum's fork on github) and one problem I've got is that our repository layout in SVN was like so:
example.com/website/trunk|branches|tags/base/code,
and so when I import it into git, the r...
I know this sounds very basic, but I couldn't find where I can access the git shell in GitX.
A bonus question: Do I have to use the shell in order to clone a repo from GitHub?
...
In cases where you don't want to download unneeded files.
...
I am setting up git between two AWS instances (call them A and B). I can pull from A fine and see changes in those files on B.
If I create a new file on B and commit it, when I push from B to A, all seems to go well (I get the git message about writing objects...done) but I don't see the files on the A machine. On the A machine, git st...
I am using Git to track my documentation latex source. I want to keep the master branch full of documents that are suitable for end user release, so when someone needs something, i can just switch to the master branch, compile and hand out the document.
I make new branches when a manual needs a major update. But, when the manual is app...
I've recently started working on a project that uses bazaar. I'm attempting to find a bazaar workflow I like, and being a regular git user I can't avoid using git as a reference point.
In git, all my branches are stored in the one directory. If a branch lasts longer than a working day, I "git push " to keep a copy on the server. Keepin...
Strange thing - on git push gitosis does not adds key for new user to the /home/git/.ssh/authorized_keys. Of course - i can add keys manually, but its not good :(
What can i do?
...
Hi,
I have installed gitosis, but i have strange thing when i'm working with repos.
In config i have
[gitosis]
[group gitosis-admin]
writable = gitosis-admin
members = me@server me@laptop
[group prj1]
writable = prj1
members = me@laptop
and in /home/git/repositories i have created directory prj1.git with empty git repo.
i can work...
Suppose I have a project in source control with a lot of subdirectories, many of which I don't need at the moment.
I would like to create a working copy containing only some of the entire tree, which still maintaining the ability to make changes, commit them, and push them back up.
Is this possible and if so, how can I do it?
I'm stil...
Hi
I am making changes to some file in my local git repository and then want to send the changes to the remote git repository from which the local was cloned via ssh.
After run "git commit -a" on my local side, to send the changes to the remote, I run
$ git push
Everything up-to-date
However I checked the remote files and they are n...
We are using CVS for around 50 java-projects which we develop using Eclipse, and build using Hudson.
We have now reached the point where we want to migrate to something better, and I am considering that using git masquerading as a CVS server might be exactly what would suit us in terms of learning curve.
We have few but long-lived bran...
I'm using so many git-svn repositories (at the same time) that it's becoming a chore to update them all. I'd like to write a script that automates this, so I can just run it every morning while I fetch a coffee.
Basically my workflow is like this
cd ~/module1
git svn fetch
git checkout master
git svn rebase
git checkout topicbranch
gi...
There are a lot of guides on Git commands but I haven't seen many that explain how developers actually use it on a day-to-day basis. I understand the basics of push, pull, commit, etc... but I don't understand when to use branches.
On the local repo:
Should you create a new branch for every set of changes or is okay to work on the mas...
I have successfully set up gitosis for an Android mirror (containing multiple git repositories). While adding a new .git path following writable= in gitosis.conf I managed to insert a few line breaks. Saved, committed and pushed to server when I received the following parsing error:
Traceback (most recent call last):
File "/usr/bi...
I've got a web site that contains a set of effectively independent tools with each tool having its own directory. For example:
/webroot
/webroot/tool-1
/webroot/tool-2
/webroot/tool-3
Development for each tool takes place individually, so being able to create different branches at different times for each is imperative.
I'm looking a...
With SVN, I have the following setup:
/tags/
/trunk/
/branches/
/branches/my_feature
/branches/my_other_feature
I want to keep all the branches in sync with mainline trunk, so I periodically run an svn merge for the branch for trunk.
However, I also want to keep all the branches in sync with one another, so as to avoid conflicts, as ...
I have an svk repo that was full of mirrors and locals etc, I cleaned it up in steps, because I'm trying to get rid of it, and evaluating what should stay. There's only one project there that I want to keep working on, and for that I want to migrate it to git so I can be done with svk for good.
It's located in //local/foo, it has no svn...
I have a situation where I will have to rebase a topic branch to a master. That's fine, it's the normal rebase case and works great.
The complication is when I'm trying to get this process to be in sync on a bare remote repository.
e.g.
o--o--o origin/master
\
o--o origin/topic
o--o--o clone/master - tracking origin/m...