ls-remote

git (ls-remote) - List “remote” branches ordered by creation date

你说的曾经没有我的故事 提交于 2021-01-28 07:33:17
问题 I know that with the git command below I can list all my "remote" branches... [someone@someone-pc somerepo]$ git ls-remote Username for 'https://somegit.com': someone Password for 'https://someone@somegit.com': From https://somegit.com/somepath/somerepo.git 32b73a94a2ef1be27298a7bbf6670670c9ad4892 HEAD 99cfe797ee2f4cd3fc12ea1aef8dc4ea0f3538c7 refs/heads/a_branch 687332d5e82436d806fea2c22ac5e8772e73b33a refs/heads/b_branch b1d82987dd87b99c505282cbcdf1d4c4d36be2d2 refs/heads/c_branch

How can I check write access to a remote Git repository (“can I push?”)

有些话、适合烂在心里 提交于 2020-05-09 18:06:31
问题 I am building a (somewhat limited) Git client. To set up a repository, you enter the URL to the remote repo. I want to check whether the user has read+write access to that repository. If not, I present an authentication dialog. I check 'read' access with git ls-remote <url> . Is there an analogous way to check 'write' access , without cloning the repo first? (I know I could git clone <url> and then git push --dry-run ) 回答1: If the git repo is in github, open any file in the repo, then click

use git repo url to check whether repository exists

这一生的挚爱 提交于 2020-01-06 17:55:08
问题 I have searched in google, they say "git ls-remote git-url" can say whether git repo exists or not. But i have a problem when use this command to check github unexisting https git url. for example, when I run below command, it will require input username and password. $ git ls-remote https://github.com/grant/noexisted.git I only want to check whether the repo exists or not, and I call "git ls-remote" command in ruby code, so how to skip this auto shell prompt? 回答1: Why not just make an HTTP

Git command - Repository heads not listed while using -h switch with “HEAD” option

痞子三分冷 提交于 2019-12-13 03:41:58
问题 There is a git repository in my LAN. I try to query Git to list all the HEAD references in the following way: Method 1 Command git ls-remote -h username@{ip-address}:/path/to/repo Output f0467f266dee55cd32f2ca6fa819814f367db899 HEAD Method 2 Command git ls-remote username@{ip-address}:/path/to/repo HEAD Output f0467f266dee55cd32f2ca6fa819814f367db899 HEAD Method 3 Command git ls-remote -h username@{ip-address}:/path/to/repo HEAD When using the above command, the head reference which was

How to use git merge-base on remote?

旧街凉风 提交于 2019-12-11 03:49:09
问题 How can use merge-base with Git on a remote repository without checking it out? Using ls-remote works fine e.g. for determining branches like this: git ls-remote --heads $REPO_URL/$REPO_NAME The documentation contains no clue, wether the use of merge-base with ls-remote is possible. Maybe it is also possible, to use alternatives to merge-base to find the common ancestor for branches/commits. At the moment, i have to checkout the repository locally, which takes a lot of time for big projects.

Git https:// repository not found though it exists

為{幸葍}努か 提交于 2019-12-07 02:48:37
问题 I have a private repo on github. It's location was changed. I tried changing the remote but I wasn't able to push anymore. ls-remote https://github.com/xxxxx/xxxxx.git gave me this remote: Repository not found. fatal: repository 'https://github.com/xxxxx/xxxxx.git/' not found I checked the spelling and it was correct. I was able to open the url in the browser I have sufficient rights on the repo. I could clone every other repo by https I removed origin with git remove origin https://github

Git https:// repository not found though it exists

我与影子孤独终老i 提交于 2019-12-05 04:16:19
I have a private repo on github. It's location was changed. I tried changing the remote but I wasn't able to push anymore. ls-remote https://github.com/xxxxx/xxxxx.git gave me this remote: Repository not found. fatal: repository ' https://github.com/xxxxx/xxxxx.git/ ' not found I checked the spelling and it was correct. I was able to open the url in the browser I have sufficient rights on the repo. I could clone every other repo by https I removed origin with git remove origin https://github.com/xxxx/xxxxx.git re-added it with git add origin https://github.com/xxxxx/xxxxx.git I did a git