git-remote

Does JGit API have all Git commands

一个人想着一个人 提交于 2019-12-23 02:32:40
问题 I am trying to port a shell script to Java which contains a few Git commands which I have mostly managed to find in the JGit API. I have not, however, managed to find the remote or am commands, is this because the don't exist or I am just looking in the wrong place for them. If they don't exist is there another way to use them? 回答1: There is no ready-to run counterpart for git remote and am in JGit, but it should be possible to implement (a subset of) them with reasonable effort. Those sub

Why does git remote prune origin remove my local tags?

半世苍凉 提交于 2019-12-22 08:37:08
问题 I have several tags that reference commits from local branches and remote tracking branches, or ancestors of those commits. I want to remove references to branches and tags on origin after having run git fetch : git remote prune origin --dry-run But the output indicates it would prune my local tags, even ones that were created manually by me instead of being fetch ed from any remote: * [would prune] origin/git-svn * [would prune] origin/ignore/some_branch * [would prune] refs/tags/MyLocalTag

Google App Engine Deployment Failed, “empty index configuration”

安稳与你 提交于 2019-12-22 04:09:06
问题 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

Caused by: java.lang.ClassNotFoundException: com.jcraft.jsch.JSchException

有些话、适合烂在心里 提交于 2019-12-21 17:43:17
问题 The protocol between local repository and remote repository is HTTPS instead of ssh,does it still need lib of jsch,and if it's true, can you tell me how to handle in details,thanks so much~~ 回答1: Even if it isn't used for https access, jsch is still required for JGit. See JGit dependencies. That thread states the same thing, even when cloning an https repo. This blog post deals with a missing jsch library like so: There are 2 ways to solve this problem, depending on your setup. 1.) If you're

git checkout new remote branch when cloning with depth 1 option

瘦欲@ 提交于 2019-12-21 05:17:35
问题 After I did a clone of a repo, a new branch test has been added to the origin remote. But I still see: $ git branch -a * master remotes/origin/HEAD -> origin/master remotes/origin/master What git command/s should I use to get the following output: $ git branch -a * master remotes/origin/HEAD -> origin/master remotes/origin/master remotes/origin/test The git checkout remote branch question is not my question because that is happening after I see all the remote branch references. I cannot clone

“src refspec does not match” and “failed to push some refs” errors on git push [duplicate]

丶灬走出姿态 提交于 2019-12-21 03:18:31
问题 This question already has answers here : Closed 7 years ago . Possible Duplicate: Error when “git push” to github I tried to push my new branch (let's just call it new_branch ) to remote rep. There is no such branch there yet, but git push origin new_branch:new_branch should create it. When I try to do it, this is what I get: error: src refspec new_branch does not match any. error: failed to push some refs to 'ssh://git@***' I dug through million of questions like this on SO, but none of them

Will remote URL for fetch and push be different?

坚强是说给别人听的谎言 提交于 2019-12-20 09:51:15
问题 git remote --v show remote info origin https://github.com/test/testing-iOS.git (fetch) origin https://github.com/test/testing-iOS.git (push) It shows that both fetch and push are using the same remote URL. Question: When will (if ever) remote URL for fetch and push be different? What commands can you use to change remote URL for fetch or push separately? 回答1: Yes (using different remote), and that is why Git 2.5 introduces a new ref shorthand @{push} . See "Viewing Unpushed Git Commits" What

error: src refspec master does not match any

寵の児 提交于 2019-12-20 08:01:14
问题 I have tried to follow the solutions suggested in this post but it didnt work and I am still getting: src refspec master does not match any. Here is what I did: Followed this solution // adding the file I created $ git add . $ git commit -m 'initial commit' $ git push origin master error: src refspec master does not match any. When doing: $ git push origin HEAD:master b40ffdf..a0d1423 HEAD -> master // looks promising // adding a remote $ git remote add devstage -f <another git> $ git merge

Git listing non-existent remotes

别等时光非礼了梦想. 提交于 2019-12-19 07:04:11
问题 I recently made some changes to my remote repos in my Git repo config file. I renamed the remote names, changing my origin to another remote repo and renaming my old origin. For example, I had this previously: [remote "origin"] url = blah blah [remote "future"] url = blah blah I went in and changed them so they look like this: # formerly the origin [remote "old-origin"] # formerly the future repo [remote "origin'] But now, when I type git branch -a , I am seeing branches listed from the old

How can I associate local unversioned code to git remote repository?

一曲冷凌霜 提交于 2019-12-18 13:01:19
问题 I need to associate a clean unversioned code to an existing git remote repository. I explain better my situation. My project is moved from svn to git. I have a svn local working copy with old code (nothing new to commit) that has to be syncronized with the new git repository. I could clone the repo but I should restore many ignored configuration files by hand and I would avoid it. So I removed all .svn directories and I would track my code with the git remote repository. Is there a way to do