repository

Is there anyway to programmatically fetch a zipball of private github repo?

谁说胖子不能爱 提交于 2019-11-30 10:57:52
问题 We got a necessity to fetch a zipball of a private repo. For public ones it's pretty easy either through GitHub API or manually ( https://github.com/user/repo/zipball/master ). But what about private repos? Not exactly obvious how to do it even having oAuth token. 回答1: New Alternative Because the given accepted answer does not work anymore, I thought I would explain how I was able to do it with the new changes in the github API. The new Download Api Link First, I found information about

Initializing private repositories on production server

强颜欢笑 提交于 2019-11-30 10:38:19
What I want to do now is to initialize a private repository on my production server in to app's www folder (ex: /var/www/app.com/web/) and then clone it as a staging repository to my testing site (ex: /var/www/test.com/web/app.com/) and finaly clone from staging to local to work with the code. Am I planning it the right way? I am following these tutorials to learn more about setting the "git server" and initialize private repositories: http://progit.org/book/ch4-4.html https://moocode.com/posts/6-code-your-own-multi-user-private-git-server-in-5-minutes http://www.layeredthoughts.com/git

Git add all subdirectories

|▌冷眼眸甩不掉的悲伤 提交于 2019-11-30 10:32: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

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

二次信任 提交于 2019-11-30 10:32:18
问题 Can you create a .gitignore file in a directory that only applies to files (and directories) within that directory? 回答1: 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. 回答2: 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

How to concatenate two git histories?

时间秒杀一切 提交于 2019-11-30 10:25:07
问题 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? 回答1: 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

Configuring multiple upload repositories in Gradle build

♀尐吖头ヾ 提交于 2019-11-30 10:23:24
I want to upload my artifacts to a remote Nexus repo. Therefore I have configured a snaphot and a release repo in Nexus. Deployment to both works. Now I want to configure my build so I can decide in which repo I want to deploy: gradle uploadArchives should deploy to my snapshots repo gradle release uploadArchives should deploy to my release repo This was my try: apply plugin: 'war' apply plugin: 'maven' group = 'testgroup' version = '2.0.0' def release = false repositories { mavenCentral() mavenLocal() } dependencies{ providedCompile 'javax:javaee-api:6.0' } task release <<{ release = true;

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

空扰寡人 提交于 2019-11-30 10:19:39
问题 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:

What type is repository pattern in?

与世无争的帅哥 提交于 2019-11-30 09:01:04
In general, I know that there are 3 big types of design pattern Creational Pattern (Factory, Singleton, etc) Structural Pattern (Composite, Adapter, Proxy, etc) Behavioral Pattern (Specification, Command, etc) But I dont know which type I can put the Repository pattern in. Is Repository pattern in one of three above type? Or is it kind of in the middle of (2) and (3) pattern? Repository can be viewed as a special kind of Façade (structural) but also as a special kind of Factory (creational). Also, as the Repository often expose collection-like interface, then it might be a special application

BestPractices: Is it acceptable to use more than one repository in a MVC-Controller?

血红的双手。 提交于 2019-11-30 09:01:00
I have a many-to-many assocition between an Employee and a Team. Foreach entity I have a repository. Now I use ASP.NET MVC and I created a EmployeeController. I also created a View to edit an Employee. For this view I need a DropDownList with all Teams. The problem is that my EmployeeController only has got EmployeeRepository. So how can I get all Teams? My solution now is to use two repositories. But is this a good solution? Could I instead create TeamController and write a method returning all Teams (how would I do that)? Yes, it's perfectly acceptable for a controller to have references to

How to use Simple injector, Repository and Context - code first

假装没事ソ 提交于 2019-11-30 08:54:59
I'm trying to use Simple Injector to create my repository and use it in the Business logic layer ( also i want to use PerWebRequest method ) . In the DAL layer i have : public interface IRepository<T> where T : class { void Add(T entity); void Delete(T entity); void Delete(int id); void Update(T entity); T GetById(int Id); IQueryable<T> All(); IEnumerable<T> Find(Func<T, bool> predicate); } and : public class EFRepository<T> : IRepository<T>, IDisposable where T : class { #region Members protected DbContext Context { get; set; } protected DbSet<T> DbSet { get; set; } #endregion #region