Skip to main content

Questions tagged [repository]

Can refer to the data store of a version control system containing the whole history of a project, or to an object that transfers data between the business layer of an application and its data store.

Filter by
Sorted by
Tagged with
5692 votes
20 answers
6.1m views

How do I push a new local branch to a remote Git repository and track it too?

How do I: Create a local branch from another branch (via git branch or git checkout -b). Push the local branch to the remote repository (i.e. publish), but make it trackable so that git pull and git ...
Roni Yaniv's user avatar
  • 59.2k
4741 votes
32 answers
1.3m views

How do I update or sync a forked repository on GitHub?

I forked a project, made changes, and created a pull request which was accepted. New commits were later added to the repository. How do I get those commits into my fork?
Lea Hayes's user avatar
  • 63.7k
3924 votes
15 answers
1.2m views

Remove a file from a Git repository without deleting it from the local filesystem

I want to remove a file from my repository. git rm file_to_remove.txt will remove the file from the repository, but it will also remove the file from the local file system. How do I remove this file ...
mveerman's user avatar
  • 40.1k
3101 votes
21 answers
3.1m views

How do I clone a Git repository into a specific folder?

The command git clone [email protected]:whatever creates a directory named whatever containing a Git repository: ./ whatever/ .git I want the contents of the Git repository cloned into my ...
David Smith's user avatar
  • 39.3k
2270 votes
27 answers
758k views

How do you merge two Git repositories?

Consider the following scenario: I have developed a 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 ...
static_rtti's user avatar
  • 55.2k
2066 votes
31 answers
1.5m views

How do I clone a subdirectory only of a Git repository?

I have my Git repository which, at the root, has two subdirectories: /finisht /static When this was in SVN, /finisht was checked out in one place, while /static was checked out elsewhere, like so: ...
Nick Sergeant's user avatar
1985 votes
47 answers
1.7m views

Download a single folder or directory from a GitHub repository

How can I download only a specific folder or directory from a remote Git repository hosted on GitHub? Say the example GitHub repository lives here: [email protected]:foobar/Test.git Its directory ...
g_inherit's user avatar
  • 19.9k
1712 votes
22 answers
1.3m views

git: how to rename a branch (both local and remote)?

I have a local branch master that points to a remote branch origin/regacy (oops, typo!). How do I rename the remote branch to origin/legacy or origin/master? I tried: git remote rename regacy legacy ...
JayD's user avatar
  • 17.9k
807 votes
10 answers
218k views

What is the difference between GitHub and gist?

What is the purpose of gist and how is it different from regular code sharing/maintaining using GitHub?
NSExplorer's user avatar
716 votes
19 answers
1.0m views

How should I deal with "package 'xxx' is not available (for R version x.y.z)" warning?

I tried to install a package, using install.packages("foobarbaz") but received the warning Warning message: package 'foobarbaz' is not available (for R version x.y.z) Why doesn't R think that the ...
Richie Cotton's user avatar
670 votes
16 answers
314k views

How to move some files from one git repo to another (not a clone), preserving history

Our Git repositories started out as parts of a single monster SVN repository where the individual projects each had their own tree like so: project1/branches /tags /trunk project2/...
ebneter's user avatar
  • 21.2k
635 votes
24 answers
460k views

How to count total lines changed by a specific author in a Git repository?

Is there a command I can invoke which will count the lines changed by a specific author in a Git repository? I know that there must be ways to count the number of commits as Github does this for their ...
Gav's user avatar
  • 11.3k
557 votes
10 answers
580k views

Untrack files from git temporarily

I have setup a local git on my machine. When I initialized git, I added pre-compiled libs and binaries. However, now during my development I don't want to check in those files intermittently. I dont ...
agent.smith's user avatar
  • 9,324
449 votes
16 answers
253k views

How do I make a Git commit in the past?

I'm converting everything over to Git for my own personal use and I found some old versions of a file already in the repository. How do I commit it to the history in the correct order according the ...
unknown's user avatar
  • 4,509
443 votes
12 answers
249k views

How do I rename a repository on GitHub?

I wanted to rename one of my repositories on GitHub, but I got scared when a big red warning said: We will not set up any redirects from the old location You will need to update your local ...
rabbid's user avatar
  • 5,655
416 votes
11 answers
387k views

How to generate a Dockerfile from an image?

Is it possible to generate a Dockerfile from an image? I want to know for two reasons: I can download images from the repository but would like to see the recipe that generated them. I like the idea ...
user1026169's user avatar
  • 5,685
369 votes
7 answers
237k views

Project vs Repository in GitHub

In GitHub, what is the conceptual difference between a project (that can be created inside a repository) and a repository? I've seen several similar questions (here, here and here) in SO, but none ...
carlossierra's user avatar
  • 4,617
366 votes
13 answers
266k views

Transfer git repositories from GitLab to GitHub - can we, how to and pitfalls (if any)?

Can one transfer repositories from GitLab to GitHub if the need be. If so, how exactly can I go about doing the same? Also, are there any pitfalls in doing so or precautionary measures that I need to ...
boddhisattva's user avatar
  • 7,290
342 votes
11 answers
92k views

Proper Repository Pattern Design in PHP?

Preface: I'm attempting to use the repository pattern in an MVC architecture with relational databases. I've recently started learning TDD in PHP, and I'm realizing that my database is coupled much ...
Jonathan's user avatar
  • 18.8k
311 votes
8 answers
175k views

Can I arrange repositories into folders on Github?

I am new to git and what I am doing now is to upload all my recent projects as repositories to github. There are a lot of different projects like webdesign, wordpress themes and different types of ...
danijar's user avatar
  • 33.6k
306 votes
11 answers
162k views

How to remove the first commit in git?

I am curious about how to remove the first commit in git. What is the revision before committing any thing? Does this revision have a name or tag?
Weihang Jian's user avatar
  • 8,369
303 votes
28 answers
972k views

How to upload a project to GitHub

After checking How can I upload my project's Git repository to GitHub?, I still have no idea how to get a project uploaded to my GitHub repository. I created a repository and want to upload my project ...
jampez77's user avatar
  • 5,131
300 votes
7 answers
150k views

Can a project have multiple origins?

Can a project have two (or more) "origins" in Git? I would like to push a single project to both github and a Heroku server. Specifically, this error appears when adding the github repository: $ ...
Chris Dutrow's user avatar
  • 49.9k
299 votes
16 answers
332k views

Moving Git repository content to another repository preserving history

I am trying to move only the contents of one repository (repo1) to another existing repository (repo2) using the following commands: git clone repo1 git clone repo2 cd repo1 git remote rm origin git ...
Mario's user avatar
  • 3,033
298 votes
11 answers
151k views

What's the -practical- difference between a Bare and non-Bare repository?

I've been reading about the bare and non-bare / default repositories in Git. I haven't been able to understand quite well (theoretically) the differences between them, and why I should "push"...
AeroCross's user avatar
  • 4,219
292 votes
4 answers
92k views

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

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 ...
Terence Ponce's user avatar
290 votes
2 answers
256k views

Repository Pattern Step by Step Explanation [closed]

Can someone please explain to me the Repository Pattern in .NET, step by step giving a very simple example or demo. I know this is a very common question but so far I haven't found a satisfactory ...
Sa Patil's user avatar
  • 3,077
288 votes
5 answers
258k views

Repository size limits for GitHub.com

Lately I have been using GitHub and I am wondering what is the repository size limit for files hosted on github.com?
user avatar
274 votes
22 answers
437k views

How do you get the Git repository's name in some Git repository?

When you are working in some Git directory, how can you get the Git repository name in some Git repository? Are there any Git commands? # I did check out bar repository and working in somewhere # ...
diveintohacking's user avatar
267 votes
2 answers
377k views

Git error: src refspec master does not match any [duplicate]

I need to create a repo named carboncake. I tried this: Cloned the gitosis-admin repository to my local machine $ git clone [email protected]:repositories/gitosis-admin.git $ cd gitosis-admin $ ...
Mithun Sreedharan's user avatar
257 votes
15 answers
213k views

can you host a private repository for your organization to use with npm?

Npm sounds like a great platform to use within an organization, curious if a private repo is possible, like with Nexus/Maven. Nothing comes up on Google :(
adam's user avatar
  • 3,945
227 votes
2 answers
74k views

Gradle buildscript dependencies

What is the difference between declaring repositories in the buildscript section of the gradle build or in the root level of the build. buildscript { repositories { mavenCentral(); } } ...
Jeff Storey's user avatar
  • 56.9k
226 votes
6 answers
237k views

Change old commit message using `git rebase`

I was trying to edit an old commit message as explained here. The thing is that now, when I try to run rebase -i HEAD~5 it says interactive rebase already started. So then I try: git rebase --continue ...
Pablo Fernandez's user avatar
200 votes
9 answers
219k views

Git - Ignore files during merge

I have a repo called myrepo on the remote beanstalk server. I cloned it to my local machine. Created two additional branches: staging and dev. Pushed these branches to remote as well. Now: local ...
Kevin Rave's user avatar
  • 14.3k
186 votes
12 answers
78k views

Delete local Git branches after deleting them on the remote repo

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 ...
sf89's user avatar
  • 5,168
184 votes
9 answers
151k views

Can I create more than one repository for GitHub Pages?

I created a repository for hosting a blog on GitHub. Is there any way that I can create additional repositories to host multiple blogs, or am I limited to just one since username.github.io can only ...
Akshat Jiwan Sharma's user avatar
177 votes
10 answers
316k views

How to return a custom object from a Spring Data JPA GROUP BY query

I'm developing a Spring Boot application with Spring Data JPA. I'm using a custom JPQL query to group by some field and get the count. Following is my repository method. @Query(value = "select count(...
Pranav C Balan's user avatar
177 votes
11 answers
400k views

How do I force Maven to use my local repository rather than going out to remote repos to retrieve artifacts?

I’m using Maven 3.3.3 with Java 8 on Mac Yosemite. I have a multi-module project. <modules> <module>first-module</module> <module>my-module</...
Dave's user avatar
  • 17.2k
176 votes
7 answers
73k views

Pull request without forking?

Here are steps of code contribution from the topic "How do I contribute to other's code in GitHub?" Fork the project Make one or more well commented and clean commits to the repository. You can ...
Jasper's user avatar
  • 5,198
175 votes
9 answers
230k views

“tag already exists in the remote" error after recreating the git tag

I get the following error after I run the steps below: To [email protected]:username/repo-name.git ! [rejected] dev -> dev (already exists) error: failed to push some refs to 'git@provider....
Luca Boieru's user avatar
  • 2,280
170 votes
3 answers
73k views

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

Can you create a .gitignore file in a directory that only applies to files (and directories) within that directory?
B Seven's user avatar
  • 45.5k
165 votes
2 answers
89k views

Pull remote branch into local repo with different name?

Alright I did a little bit of research on this but I couldn't find an exact answer, so I have to ask. I have 2 remotes: origin and repo2. I'd like to do something like git pull repo2 master But ...
Cosmin Atanasiu's user avatar
165 votes
4 answers
185k views

Connect a local repository with a remote repository

I have a local repository. I created the whole application, but now I want to push it to a remote repository. I already have remote repo as well. How can I connect these two repositories without ...
Om3ga's user avatar
  • 32k
160 votes
9 answers
174k views

Git: add vs push vs commit

What is the difference between git add, push and commit? Just a little confused coming from SVN, where "update" will 'add' stuff, and commit does a "push" and will 'add' as well There are all ...
CQM's user avatar
  • 43.7k
158 votes
7 answers
92k views

How do I move a single folder from one Subversion repository to another repository?

I have a "docs" folder in a Subversion repository named "project". I've come to the conclusion that it should really be kept under a separate Subversion repository named "project_docs". I'd like to ...
leftend's user avatar
  • 1,934
155 votes
5 answers
103k views

What is included in JCenter repository in Gradle?

Please note that JCenter will switch to readonly mode. Avoid using it. jcenter() will be removed in Gradle 8.0. From Gradle 1.7 there is a new public repository JCenter. repositories { jcenter() } ...
Xelian's user avatar
  • 17k
151 votes
3 answers
130k views

Git pull from another repository

I have a repository called Generic, which is a generic application. I have forked it into a repository called Acme, which just builds upon the application stored Generic repository and adds Acme Co ...
Libbux's user avatar
  • 1,771
149 votes
13 answers
205k views

Where is Maven's settings.xml located on Mac OS?

Where is Maven's settings.xml located on Mac OS?
cesarggf's user avatar
  • 1,782
148 votes
14 answers
107k views

Heroku 'Permission denied (publickey) fatal: Could not read from remote repository' woes

I've searched around for many hours on end looking to a solution to my seemingly easy-to-fix problem. It's not that my search turned up nothing, it's that my search turned up so many different ...
thebradbain's user avatar
  • 3,139
148 votes
14 answers
90k views

GitHub changes repository to the wrong language

I know this isn't a huge deal, but I like my GitHub to be linguistically diversified. I wrote a project in Swift and when I commit it says it's in Objective-C. I think it might be because the Parse ...
Echizzle's user avatar
  • 3,409

1
2 3 4 5
184