Home > git > What to do with .git folder and data in Xcode?

What to do with .git folder and data in Xcode?

October 25Hits:1
Advertisement

I am using Hg for my development. Recently, I upgraded to Lion and Xcode 4.2 and I have created a Xcode project in my source tree. The Xcode by default uses Git and created .git folder in the project folder.

Being able to do versioning in Xcode is a plus but it is sort of redundant with both Git and Hg.

The problem is, should I check in the .git (folder and files) in the Xcode project folder or not? Or should I just switch off Git in Xcode and delete .git folder?

Thanks.

Answers

The second. Versioning version data doesn't make much sense, unless you want to track the state of the entire git repository in your mercurial repository. Even worse, if you also add the .hg to the git repo, both repositories will try to track each other; once you commit to hg, git will see a difference, which you should then commit, and then hg in turn sees a new difference, and so on, indefinitely.

In other words, it doesn't make sense to put the version control directory under version control. Either roll with only git, or with only mercurial. If you really want to, you can use git to interface with mercurial repositories, and vv (AFAIK both can read each other's data structures), and you can even use them alongside each other, but that would be kind of redundant and pointless.

.git is the folder that has the git repo of XCode. If you want to keep both your Hg and git repos in sync you can use something like hg-git

When having projects in both git and hg repositories, clone your projects from both repositories into different work copy folder. If you preferred, use hg-git to check out git repository using hg.

In my case, I use SourceTree, a GUI client, that supports both git and hg so I don't have to deal with the complexity of setting up hg-git.

Thanks.

Related Articles

  • What to do with .git folder and data in Xcode?October 25

    I am using Hg for my development. Recently, I upgraded to Lion and Xcode 4.2 and I have created a Xcode project in my source tree. The Xcode by default uses Git and created .git folder in the project folder. Being able to do versioning in Xcode is a

  • How to automatically update folder modified date in Windows

    How to automatically update folder modified date in WindowsJune 1

    In Windows, is there a way to update automatically (or with a simple script) the date of a folder with the latest modified date of any of its files (recursive)? --------------Solutions------------- You can do this in PowerShell. Something like this t

  • Should this folder called Data be indexed?

    Should this folder called Data be indexed?April 6

    In the indexing options of Windows 7 there is a folder called Data which is excluded from indexing for the C:\ drive by default. Can someone confirm this, please? I was not able to locate that folder on my drive, nor include it in the search index. T

  • Recover shift-deleted .hg or .git folder and its content in Windows 7June 28

    I've tried using Recuva, Undelete Plus, and some other tools. But it seems these tools are unable to find the content stored in .hg or .git folder, I can only recover .hgignore or .gitignore files. Does this have anything to do with NTFS? Is there an

  • Backup current folder with date added to the filenamesDecember 7

    Working on the Windows PC, I've used the cmd file with the following line: winrar.exe a -agYYYYMMDD -x*\*.cmd -r -ibck -ep1 -ed "%~dp0..\_materials\bak - .rar" *.* It helped me to create backups of the current folder with date added to the filen

  • Sort items in folder by date-only for that folder!

    Sort items in folder by date-only for that folder!April 28

    Normally I have all my Finder sorted alphabetically but, for some folders, order by date would be better but changing order in those folder will change order for all Finder... Is there a way to sort items in a different way only for that folder? ----

  • What is .git folder and can I delete it?August 13

    I used DaisyDisk to get info about my drive. I found a folder named ".git" in my documents. Its size is about 15 GB. what is it? and can I delete it? --------------Solutions------------- Git is a version control system and stores the history in

  • Make git ignore modification date changes if the content of the file stays the sameFebruary 1

    I have python scripts which generate and modify different xml-files. They work so that they open a file, create an ElementTree object based on it, try to modify object's content if necessary and than save those objects into origin files. The thing is

  • creating folder with date range linux shell or CMarch 30

    Hi i need to create a series of folder with a range of date for exmaple createdir 2010-02-02 2010-02-05 will create : 20100202/ 20100203/ 20100204/ 20100205/ What the best way to do this with a Shell Script or with a C POSIX program? --------------So

  • Mounting a Windows share as a folder with data persistance in Win7/XPMay 9

    I was wondering if anyone had figured out a good way of mounting a network share (\\server\dir1\dir2) to a folder (say C:\folder1\folder2) in such a way that when the share is disconnected the data remains. Offline Files doesn't seem to work well wit

  • Delete all files in folder by date in file nameNovember 5

    I'm trying to figure out how to delete all files in a folder that are older then two days. The last modified date doesn't help. I need to go by the date in the file name. The file will name will be something like: AD-YYMMDD-B7D or BB-YYMMDD-A6C or RE

  • git folder on centOS 6November 13

    I installed red hat openshift tools on CentOS 6.3. Then I checked git --version It is already installed, but I don't know whether it was installed before openshift tools or not. I configured git: git config --global user.name "myname" Then I wan

  • Folder creation date is very recent, while last modified is years ago

    Folder creation date is very recent, while last modified is years agoJanuary 21

    We're experiencing some weird stuff with our roaming user profiles. We use folder redirection for Documents/Pictures/Music/Destkop/Downloads, yet these folders are being created in the roaming user profile (they shouldn't). Looking at the dates for t

  • How to sort files in folder by date created?August 7

    Is there a way to sort files in a folder by the date of their creation? I'm trying to figure out in which order my documents were created. --------------Solutions------------- Looking at the Google Support Page it appears there is no way currently to

  • Whatsapp folder in /data/ parition goneSeptember 7

    I was reflashing CM10.2 on my GT-i9300. (Also did a backup with CWM 6 but the data partition was not backuped, which I did not noticed..) I booted the new Rom and installed Titanium Backup to recover my apps but my all kinds of services crashed... So

  • Sort Saved Searches by 'Name' and Downloads folder by 'Date Added' in Yosemite FinderOctober 28

    I have a bunch of saved file searches in my Finder sidebar. I want them sorted by Name (they are all journal article PDFs which start with author names). However, I want my Downloads folder sorted by Date Added. It seems that no combination of checki

  • Folder modification date not updating when sub folder is createdNovember 14

    I have found a pretty annoying behavior in windows server 2012 and failed to find a solution to fix it. I also tried this on a Windows 7 instance and it simply works :( Some aspects of the issue are discussed in the comments of this post. I have a fo

  • git rebase keep date order

    git rebase keep date orderJanuary 20

    I needed to do a very big git rebase to reorganize all the repository. In order to keep my tree, I used git rebase --preserve-merges --onto master bf40caa develop At first everything worked fine, all the merges are preserved and work OK, however, in

  • ignore git folder without removing from remote repo, and ignore new filesFebruary 8

    We have a git repository that has a folder in it we would like to untrack, so that: The folder is still in our remote directory, but any changes done locally are not shown when running "git status" Any new files that are automatically added to t

  • Mount external SD folder to /data/userSeptember 10

    I'm trying to free up some space and install large games on my rooted Samsung Galaxy S2 with an external SD card. The app I've been using is FolderMount, which mounts any folder in a different location. Using this app, I've successfully mounted /stor

Copyright (C) 2017 ceus-now.com, All Rights Reserved. webmaster#ceus-now.com 14 q. 0.630 s.