git-remote

Why is old name of git remote sill in .git/refs/remotes?

巧了我就是萌 提交于 2019-12-06 12:00:34
问题 I recently moved my 'main' remote git repository from code.google to github . Then, I renamed old origin repo to code-google and previously created remote github to origin . So far so good. But... There are still references in .git/refs/remotes : code-google github origin I tried this, but it does not seem to be working: $ git remote prune github --dry-run fatal: 'github' does not appear to be a git repository fatal: The remote end hung up unexpectedly Why is github still there since it was

Programmatically get remote used for git push

时光毁灭记忆、已成空白 提交于 2019-12-06 11:49:05
How can I obtain the remote used when issuing git push ? I want to be able to use this in a script, or in git alises. Related: Default remote for git fetch The answer is not as simple as for fetching, because there is a list of fallbacks which need to be considered: branch.<name>.pushRemote remote.pushDefault branch.<name>.remote origin These aliases take into account all of the above: branch-name = "symbolic-ref --short HEAD" # https://stackoverflow.com/a/19585361/5353461 branch-remote-fetch = !"branch=$(git branch-name \"$1\") && git config branch.\"$branch\".remote || echo origin #" branch

Cleaning remote Git branches

随声附和 提交于 2019-12-06 10:54:59
问题 I have moved an SVN repo to Git and probably due to a number of clonings, I'm now left with a bunch of branches that look like BranchA origin/BranchA remotes/BranchA remotes/origin/BranchA remotes/origin/origin/BranchA i.e. the same branch is listed a number of times. How can I clean this mess up. There are > 50 branches, some are not needed at all, and for the rest I'd be happy with just having them once. EDIT: This is what git remote show origin looks like for a certain case: Remote

How to add a remote to a repository with lfs?

喜你入骨 提交于 2019-12-06 07:29:12
I'm trying to set up something like this: a bare repo on my HDD drive and a clone of it on my SSD with lfs installed. I'm doing it like this: First I set up a bare repo on my HDD: mkdir git_lfs_test.git cd git_lfs_test.git git init --bare And then on my SSD: git clone D:/Git/git_lfs_test.git cd git_lfs_test git lfs install git lfs track '*.png' After doing this I open the cloned repo in GitKraken. I make the initial commit and then commit and push the .gitattributes file. Then I create a png file (which GitKraken recognises as a lfs file) and push it to the origin. It throws this error: Remote

Git: Push a local git submodule, including submodule files, to a remote bare repository

不打扰是莪最后的温柔 提交于 2019-12-06 06:10:22
I have two local projects which I manage with git , one being dependent on the other – like this: project A/ ├── project B/ │ ├── file B₁ │ ├── file B₂ │ ├── … It makes sense to me to have project B as a git submodule of project A . Now, I have set up a remote bare repository for project A for backup and sharing purposes. Of course, I want the remote repository to contain all of project B , including its files ( file B₁ , file B₂ , …). But git push and git push --recurse-submodules=on-demand don’t achieve this. Whenever I list the files in my remote repository by git ls-tree -r HEAD , only the

How can I reject git pushes on an origin repo from a local repo if it does not pass unit tests?

眉间皱痕 提交于 2019-12-06 05:08:06
I have an origin repo that I have full access to and I don't want code to be pushed successfully to this repo unless the code being pushed successfully passes my unit tests. I saw many examples of .git/hooks/update scripts and they seem to break down into a few categories that do not fit my use case. For example, in ( http://git-scm.com/book/en/Customizing-Git-An-Example-Git-Enforced-Policy ), the script accesses files locally in the .git/hooks/ directory (ACL example) or individual files in the new or old SHAs. I need to do an entire build process on all the new files as if I were in the

Remote Pushurl won't work

那年仲夏 提交于 2019-12-06 03:47:39
I'm using GIT for my projects. Now I want to integrate it with github, so I created a remote: git remote add github https://WouterJ@github.com/WouterJ/project.git But now I need to fill in a password for fetching, something that I don't want. So I decided to use a different url for fetching: git remote set-url github http://github.com/WouterJ/project.git git remote set-url --push github https://WouterJ@github.com/WouterJ/project.git If I run git remote -v I get this: $ git remote -v github http://github.com/WouterJ/project.git (fetch) github https://WouterJ@github.com/WouterJ/project.git (push

How to delete files from git bare remote repository?

余生颓废 提交于 2019-12-05 07:47:16
I have a remote bare git repository. A new developer cloned it, but he didn't have a properly configured .gitignore file, so he mistakenly pushed some unwanted files into the remote. When I pulled the changes and merged, I got these previously untracked files. Others have also pulled the changes from the remote and have these unwanted files as well. How do I delete these files from the remote repository, and everyone else's remote/origin/branches? This is a three step process: Remove the files from your copy of the repository (either with git rm or by totally purging these files from your

Google App Engine Deployment Failed, “empty index configuration”

会有一股神秘感。 提交于 2019-12-05 03:29:12
I've been trying to push my local copy to the remote repository. However, the following error shows up on my console: Total 0 (delta 0), reused 0 (delta 0) remote: Deploying... remote: Created deployment: uconnect-dev-server.clouddev.gaeTemplate-d981b975f1ecaa6d.deployment_1382264909584 remote: Created deployment: uconnect-dev-server.clouddev.gaeTemplate-d981b975f1ecaa6d.deployment_1382264909584 remote: Created deployment: uconnect-dev-server.clouddev.gaeTemplate-d981b975f1ecaa6d.deployment_1382264909584 remote: Deployment failed: Deployment failed, details: { Failed to load application, Empty

How do I change a commit message after a 'git-pull' auto-merge?

最后都变了- 提交于 2019-12-05 02:39:48
问题 Occasionally, my collaborators will "panic" when there is an automatic merge generated as the result a git-pull , and just accept the default commit message. Before this commit gets pushed, I want to be sure the message gets fixed, but --amend seems not to work. What is the best way to fix the message that's generated in this scenario. The best instructions I can come up with for them are git reset --soft HEAD~ git merge -m <message> <the tracked remote branch> but that seems a bit scary (