repository

Android Studio Git .gitignore vs Project > Settings > Version Control > Ignored Files

北慕城南 提交于 2019-11-29 22:13:44
I am somewhat confused, I noticed that upon setting up my first Git repository in Android Studio all of the correct files to ignore were automatically added to the Project's Settings under Settings > Version Control > Ignored Files. This appeared to be magic, I never told it what to ignore. Moreover, there is no .gitignore file in any directory of my project as I'm used to creating. This being said, I can't get my second project to automatically add ignored files, and really, I just want to use the simple .gitignore method. Does anyone know how to override Android Studio's ignored files list

Git add all subdirectories

依然范特西╮ 提交于 2019-11-29 21:17:37
I'm having trouble adding a folder and all of it's subdirectories to my git repository. I realized this is a very popular question after doing some googling and I've tried each suggestion with no luck, specifically the suggestion from the man page on git-add . I even tried git add -A with no success. For simplicity sake, say I initialized my git repository as Dir1 . Then I have the following directory structure of files. Dir1/file1-1.txt Dir1/file1-2.txt Dir1/Dir2/file2-1.txt Dir1/Dir2/Dir3/file3-1.txt My real files have subdirectories that span 5-6 levels deep, so is there a git command to

Can you have additional .gitignore per directory within a single repo?

旧城冷巷雨未停 提交于 2019-11-29 20:47:01
Can you create a .gitignore file in a directory that only applies to files (and directories) within that directory? Yes, you can. Try it, it works fine. Put a .gitignore in the root of your repo, and put another .gitignore with additional things to ignore in a subdirectory. Tats_innit Similar question was: Are multiple `.gitignore`s frowned on? (Jul 2010) Or if you can have different version of a .gitignore file per branch: Using github to host public git repositories whilst ensuring that sensitive data files remain untracked (Feb 2010) Further perhaps related: How do I tell git to always

How to concatenate two git histories?

你。 提交于 2019-11-29 20:42:17
I have two git repositories that are tangentially related. Namely, content of one was a predecessor of the other. I would like to somehow prepend the full history of depository A to the depository B, so that tip of A would be a parent of the very first changeset of repository B? Histories in both are pretty linear. Is this possible? VonC You could try using the graft file ( .git/info/grafts ) where you could overwrite the parenthood of a commit (like the first of projectB having for parent the latest of projectA ) See also " What are .git/info/grafts for? " and " How to prepend the past to a

SVN move single directory into other repository (with history)

旧城冷巷雨未停 提交于 2019-11-29 20:37:37
Related question: Moving repository trunk to another’s branch (with history) I know that one can dump a complete SVN repository with history and load it into a user-defined (sub)directory of the target repository using: // in source repo > svnadmin dump . > mydumpfilename // in destination repo (backslashes because I'm using Windows) > svnadmin load . < mydumpfilename --parent-dir some\sub\directory But this will import the full repository into the target repository's sub-directory. What I want is to define a sub-directory in the source repository that should be exported. Something like

Using DTO to transfer data between service layer and UI layer

感情迁移 提交于 2019-11-29 20:31:12
I've been trying to figure this out for days but there seems to be very little info on this particular subject with ASP.NET MVC. I've been Googling around for days and haven't really been able to figure anything out about this particular issue. I've got a 3 layer project. Business, DAL and UI/Web layer. In the DAL is dbcontext, repository and unit of work. In the business layer is a domain layer with all the interfaces and the EF models. In the business layer there is also a service layer with DTOs for the EF models and a generic repository service that accesses the repository. This picture

git checkout --ours does not remove files from unmerged files list

喜夏-厌秋 提交于 2019-11-29 20:29:09
Hi I need to merge two branches like this. This is just an example what is happening, I work with hundreds of files which need resolution. git merge branch1 ...conflicts... git status .... # Unmerged paths: # (use "git add/rm <file>..." as appropriate to mark resolution) # # both added: file1 # both added: file2 # both added: file3 # both added: file4 git checkout --ours file1 git chechout --theirs file2 git checkout --ours file3 git chechout --theirs file4 git commit -a -m "this should work" U file1 fatal: 'commit' is not possible because you have unmerged files. Please, fix them up in the

Automatically keep a secondary repo in sync with a primary repo?

送分小仙女□ 提交于 2019-11-29 20:18:57
We have a two tier setup. We have a primary repository (called 'primary' below). And a secondary repository (called 'secondary' below) that was created like so: $ git clone --bare --shared $REPO_A/primary secondary.git People working on the secondary repository view the branches which originated from the primary repository as read only but base their own branches off these branches. We want to sync up the secondary repository with the primary repository once a day. I.e. we want commits and new branches that were pushed to the primary to become visible to people working off the secondary

Can two identically structured git repos be merged when they have never had any common history?

半腔热情 提交于 2019-11-29 19:56:49
问题 I have two small git repos. The projects both started from different points but converged to a very similar one (same file names, folder structure, etc). One is not a branch of the other, but one can be considered an evolution of the other. It would be nice if I could merge the two so that repo2 is the continuation of repo1 . Is this possible, whilst adding the history of repo2 to the end of repo1 's? 回答1: You can fetch one into another: $ cd project1 $ git config remote.project2.url /path/to

How to split an SVN folder into its own repository when it has been renamed?

允我心安 提交于 2019-11-29 19:37:36
I want to split a directory from a large Subversion repository to a repository of its own, and keep the history of the files in that directory. I tried the regular way of doing it first svnadmin dump /path/to/repo > largerepo.dump cat largerepo.dump | svndumpfilter include my/directory >mydir.dump but that does not work, since the directory has been moved and copied over the years and files have been moved into and out of it to other parts of the repository. The result is a lot of these: svndumpfilter: Invalid copy source path '/some/old/path' Next thing I tried is to include those /some/old