repository

git - Is it possible to exclude file from `git push`, but keep them in the local repository?

▼魔方 西西 提交于 2019-11-27 11:03:19
问题 In my home directory I have files in a local git repository, because I want track them all under version control. Most of these files I want to push to a remote repository, but a few I want to keep in my local repository only (they contain mildly sensitive information). How can I achieve this with git? Can I configure a " .gitignore-for-push " file? I cannot use the local .gitignore file, because it would exclude these files completely from being tracked. ps: I am aware of question Is there

Should I store all projects in one repository or multiple?

做~自己de王妃 提交于 2019-11-27 10:52:13
I am currently using TortoiseSVN to manage a couple of the projects that I have on the go at the moment. When I first moved everything into source control I wasn't really sure how everything should be laid out so I ended up putting each project into its own repository. I was wondering would it be a good idea for me just to move them all into one big repository and have them split into project folders? What does everyone else do? At the moment none of them share common code but they may in the future. Would it make it easier to manage if they where all together. Thanks. Depends to an extent

How can I log all entities change, during .SaveChanges() using EF code first?

我们两清 提交于 2019-11-27 10:32:26
问题 I'm using EF code first . I'm using a base Repository for all my repositories and an IUnitofWork that inject to the repositories, too: public interface IUnitOfWork : IDisposable { IDbSet<TEntity> Set<TEntity>() where TEntity : class; int SaveChanges(); } public class BaseRepository<T> where T : class { protected readonly DbContext _dbContext; protected readonly IDbSet<T> _dbSet; public BaseRepository(IUnitOfWork uow) { _dbContext = (DbContext)uow; _dbSet = uow.Set<T>(); } //other methods } e

IntelliJ IDEA: “Indexed Maven Repositories” list - how to add remote maven repository in this list?

≯℡__Kan透↙ 提交于 2019-11-27 10:32:11
问题 I'm having trouble understanding how to get repositories in the "Indexed Maven Repositories" list of the IntelliJ IDEA. In one my project I have two repos in this list: one local and one (main) remote (see attached screenshot below). And in other project (created using AppFuse template) I have only one (local) repo in list. I'm tried to add the repos in pom.xml file and in settings.xml file, but the repos did not appear in this "magic" list. And this means: I can't see artifactId and versions

Install a local R package with dependencies from CRAN mirror

三世轮回 提交于 2019-11-27 10:28:13
问题 I have built an R package, i.e. I have the mypackage.tar.gz file. This package depends on several other packages, all downloadable and installable from any CRAN mirror. Now I want to install this package on a system where the dependencies are not yet installed, and I would like that the dependencies will be downloaded and installed automatically when I install my package. I tried: install.packages("mypackage.tar.gz",type="source",dependencies=TRUE,repos="http://a.cran.mirror") but it searches

How can I uncommit the last commit in a git bare repository?

若如初见. 提交于 2019-11-27 10:22:15
Taking into consideration that there are several git commands that make no sense in a bare repository (because bare repositories don't use indexes and do not have a working directory), git reset --hard HEAD^ is not a solution to uncommit the last change in such a repository. Searching through the Internet, all I could find related to the topic is this , in which I am presented three ways of doing this: 1. "update the ref manually (which involves plumbing)"; 2. " git push -f from a non-bare repository"; 3. " git branch -f this $that ". Which solution do yo think is more appropriate or what

If I fork someone else's private Github repo into my account, is it going to appear in my account as a public repo?

亡梦爱人 提交于 2019-11-27 10:12:56
Someone gave me access to one of their private repo on Github. What I want to do is to fork that project into my own account, so I could make use of Github's pull request feature. I only have a basic account on Github, so I cannot make private repos on my own, but if I fork someone else's private repo into my account, is it going to appear in my account as public? ebaxt No. You can fork it and it still remains private. Private collaborators may fork any private repository you’ve added them to without their own paid plan. Their forks do not count against your private repository quota. https:/

Git: Merge a Remote branch locally

落爺英雄遲暮 提交于 2019-11-27 10:01:59
I've pulled all remote branches via git fetch --all . I can see the branch I'd like to merge via git branch -a as remotes/origin/branchname. Problem is its not accessible. I can't merge or checkout? VonC You can reference those remote tracking branches ~(listed with git branch -r ) with the name of their remote. You need to fetch the remote branch: git fetch origin aRemoteBranch If you want to merge one of those remote branches on your local branch: git checkout master git merge origin/aRemoteBranch Note 1: For a large repo with a long history, you will want to add the --depth=1 option when

SVN move single directory into other repository (with history)

我们两清 提交于 2019-11-27 09:59:25
问题 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

Delete local Git branches after deleting them on the remote repo

心不动则不痛 提交于 2019-11-27 09:58:49
I want to have my local and remote repositories always in sync in terms of branches. After a Pull Request review on GitHub, I merge and remove my branch there (remote). How could I fetch this information in my local repository and get Git to remove my local version of the branch as well? The quick way git branch --merged | grep -v "\*" | xargs -n 1 git branch -d NB: if you're not on master , this has the potential to delete the branch. Keep reading for the "better way". Make sure we keep master You can ensure that master , or any other branch for that matter, doesn't get removed by grep ing