How to create two Git repositories in the same base directory, without using branches?
We are currently in the process of moving our Magento Enterprise (an e-commerce web application) files into Git. The httpdocs/.gitignore file contains, among other things:
After initializing, committing and pushing httpdocs/, our first Git repository was successfully created. We now want to put both of the aforementioned directories into their own, separate repository. (Together, in a single repository!) The problem we run into here is that these directories share a common root that already contains our first Git repository; that is: httpdocs/
I've read it is possible with the submodule functionality to embed other repositories within subdirectories of existing trees. However, the documentation at for example kernel.org and git-scm.com seems so complicated that it makes me wonder whether this is really the way to go forward. All we need is two separate repositories, they just happen to have the same root.
Another possible solution I've read about might be to initialize from app/design/frontend/company/website/ and add skin/frontend/company/website/ as a graft point in order to join these directories together. However, again, this seems overly complicated, and intended rather to be used when moving from another revision control system to Git.
I want to compare four TFS branches at the same time using TFS 2010 and need to create report for the differences. Any Idea ? Thanks, Minesh Bihola
Does anyone have experience using LDAP as auth method to manage Git Repositories, my boss prefers using LDAP than other tools. Any suggestion will be help! More detailed information will be very welco
I have a number of git projects created as clones of SVN repositories using git-svn. We have migrated our SVN repositories to a new provider so the URL has now changed. How can I update the remote SVN
Where I work, we use a slightly unconventional svn repo layout for projects. It looks like this: project/ branches/ tags/ trunk/ utils/ We're a pretty small company, and most of our projects are rela
Consider the following scenario: I have developed small experimental project A in its own git repo. It has now matured, and I'd like A to be part of larger project B, which has its own big repository.
I am using one open source project which is hosted on git-hub. I am also making lots of changes in this project at my end and keeping this in my another local repository. So when i need to fetch new
I'm looking into setting up a gated commit workflow using git branches for each developer like this: Each developer has their own remote branch. A developer only pushes to their remote branch. The C.
I have two repositories. One is Git repository. And other is Mercurial repository. Is it possible to show difference between two branches between two repositories?
This question already has an answer here: Showing which files have changed between git branches 8 answers I have two branches, branch_1 and branch_2. I want to see the differences between the
I want to build a project using two Git repositories. One of them contains of the source code, while the other has the build and deployment scripts. My problem is that I need to have a repository for
I have project with many branches. I would like to work on these simultaneously without switching back and forth with git checkout. Is there any way I can do that besides copying whole repository some
So I've inherited a fairly large code base from some other developers, with code stored in various git repositories. Sometimes, it's hard to know which project a particular piece of code might lie in,
I'm using the git flow tools and I've gotten myself in a bit of problem. My git branches have diverged. I've read master branch and 'origin/master' have diverged, how to 'undiverge' branches'? and hav
I'm currently working on multiple changes/bugs and I would like to be able to work on these individually using individual local branches. But when I am in the middle of working on something on for exa
Find common ancestor of two branches - this question explains how to show a common ancestor for two branches. git merge-base branch1 branch2 However, I want to see a common ancestor of three or more
git branch -a shows both remote and local branches. git branch -r shows remote branches. Is there a way to list just the local branches?
This question already has an answer here: Using Git, show all commits that are in one branch, but not the other(s) 7 answers I have two branches - master and experimental. How can I see which c
I have a branch with a new feature that I don't want to merge yet, just resolve the conflicts. Is there a way to get the conflicts without actually merging?
As EF6 is now fully mockable and we have the unit of work and repository built in - I'd like to move away from repository pattern. However, how is one to share a single data context across an applicat
I have setup Jenkins to automatically build several git branches of my project. The build also triggers Sonar analysis, as a post-build action. The problem is that all branches point to the same Sonar
I have a repository on github that I and a friend work concurrently on. We branched our local copies of the master on github and added a lot of features to our individual branches. But we only committ
I understand conceptually that a branch I create in my local GIT repository must be configured to track a specific branch on a remote GIT if I expect the commands like pull to work without specifying
I have read numerous SO questions and blogs on git-svn and merging. Some of them (notably git-svn man page) warns against using merge anywhere near the branch I plan to dcommit from. Others, like this
UPDATE I set up the two Git repositories following the directions from one of the answers below, but the back-up directory doesn't have copies of the files in the working directory. This is what I see
Assume I have the following situation: There is a repository main of User Foo. User Bar forks this repository, so both repositories are in sync. Now user Bar implements a feature and creates a local b
This question is somewhat similar to How to combine two branches from two different repositories in a single repository?. However, I want to combine two branches from the same repository into one bran
I can remove a file from a git repository with git rm --cached <file> But when I pull these changes in a cloned directory, this file will be deleted there. Is it possible avoid this without sav
I just created the default repository pointing to origin/master I would like to create a release and a production branch Should I create a git branches from origin/master itself e.g. git branch releas
I want to add and commit a file in git without changing my current working directory. Is this possible? > pwd /tmp > git --git-dir=/tmp/git_test/.git init Initialized empty Git repository in /tm
I have two codebases, called a and b. Project a provides a common infrastructure that project b relies upon. However, all of the code for for project b is underneath the directory structure for projec
I have two projects, ProjectA and ProjectB. Each of them has its git repo. These projects have many of the same files. These files are in the folders named common both in ProjectA and ProjectB. Here
I have a following problem - I'm working on a Git repository that's based on a SVN repository. I used git svn clone path-to-repo command to clone the SVN repository so my Git one retains the same hist
I'm working on a Jenkins job and i need it to build two branches in the same repository. How can i do this?
This is probably a novice question, so I apologize for my daftness ahead of time. I am deploying to Heroku, and managing my repository through github. So I have two git accounts with one code base. My
I sometimes work with source code repositories containing many branches, most of which are old and usually no longer relevant. In these cases, the full list of branches from git branch is not very hel
Can I nest git repositories? I have: /project_root/ /project_root/my_project /project_root/third_party_git_repository_used_by_my_project Does it make sense to git init/add the /project_root to ease
I have two branches created at Bitbucket, one called master and another called modulo-contratos. The thing is that the second branch has changes in some files that I need to integrate into master, bu
I have two unrelated (not sharing any ancestor check in) Git repositories, one is a super repository which consists a number of smaller projects (Lets call it repository A). Another one is just a make
I have a complex repository where sometimes the logical boundaries between code segments crosses directory boundaries. Sometimes a single file in directory X really needs to go with files in directory
My current situation I have 2 git repositories of the same software project, where one is the fork of the other: fork: A1 - B1 - C1 - ... - HEAD_FORK : (Some changes done outside of git) : orig: A2 -
Suppose that I hav two git branches; branch_one and branch_two. If I merge these branches, will one of the two branches be considered more up to date that the other? Is there a difference between gi
How can I update multiple git repositories from their shared parent's directory without cd'ing into each repo's root directory? I have the following which are all separate git repositories (not submod
I have a number of branches in a git repository: david@Panama ~/app: git branch -r origin/HEAD -> origin/master origin/master origin/newButtons origin/newFonts origin/serverView If I try and impor
This question already has an answer here: Get a diff of a file in two different branches 2 answers I have two git branch. I want to compare the same file in two git branch. But I don't want to
How would I run git commands on a repo when I am not cd'd into that directory? i.e. git branch /repos/myrepo.git
I want to make a single commit on different branches at the same time, since, in my project, I have different branches for different clients. Say, I have made a new feature commit on Branch A. Can I a
Need urgent help in GIT i have my code in master branch, then there is another branch named dev, dev is ahead of few commits than my master branch, before merging i even took a master branch backup 'm
the title says everything. I want to create a branch on top of an existing branch. I tried to do it with switching to a new branch and creating a new branch while still having the branch checked out.
Given a number of branches, I'd like a file hierarchy that I could browse in my IDE that would show the files and folders that are associated with the branch. There are probably some tricks and gotch
I have a repositories, i want to have two views: Developers can see the whole thing and customers should only see certain (tagged, or marked in another way) branches. I thought about making two reps