usage: git remote add [<options>] <name> <url> -f, --fetch fetch the remote branches ...

本文解决了一个常见的Git操作错误,即在添加远程仓库时由于命令中的空格导致的问题。通过删除空格,成功链接了GitHub上的远程仓库。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

按照git官网提示输入

git pushgit remote add origin git@github.com:***3 / elm-1.git -u

  

链接git远程仓库

出现错误

usage: git remote add [<options>] <name> <url>
     -f, --fetch fetch the remote branches 
    --tags import all tags and associated objects when fetching or do not fetch any tag at all (--no-tags)
     -t, --track <branch> branch(es) to track 
    -m, --master <branch> master branch 
    --mirror[=<push|fetch>] set up remote as a mirror to push to or fetch from

  原因:官网上的有空格

把空格删掉

 

git pushgit remote add origin git@github.com:***3/elm-1.git -u 

  

欧克

转载于:https://www.cnblogs.com/chargeworld/p/10308733.html

git branch --contains e49f53fcbe30b53e49983a5ba1f1dec36932a06c error: no such commit e49f53fcbe30b53e49983a5ba1f1dec36932a06c usage: git branch [<options>] [-r | -a] [--merged | --no-merged] or: git branch [<options>] [-l] [-f] <branch-name> [<start-point>] or: git branch [<options>] [-r] (-d | -D) <branch-name>... or: git branch [<options>] (-m | -M) [<old-branch>] <new-branch> or: git branch [<options>] (-c | -C) [<old-branch>] <new-branch> or: git branch [<options>] [-r | -a] [--points-at] or: git branch [<options>] [-r | -a] [--format] Generic options -v, --verbose show hash and subject, give twice for upstream branch -q, --quiet suppress informational messages -t, --track set up tracking mode (see git-pull(1)) -u, --set-upstream-to <upstream> change the upstream info --unset-upstream Unset the upstream info --color[=<when>] use colored output -r, --remotes act on remote-tracking branches --contains <commit> print only branches that contain the commit --no-contains <commit> print only branches that don't contain the commit --abbrev[=<n>] use <n> digits to display SHA-1s Specific git-branch actions: -a, --all list both remote-tracking and local branches -d, --delete delete fully merged branch -D delete branch (even if not merged) -m, --move move/rename a branch and its reflog -M move/rename a branch, even if target exists -c, --copy copy a branch and its reflog -C copy a branch, even if target exists --list list branch names -l, --create-reflog create the branch's reflog --edit-description edit the description for the branch -f, --force force creation, move/rename, deletion --merged <commit> print only branches that are merged --no-merged <commit> print only branches that are not merged --column[=<style>] list branches in columns --sort <key> field name to sort on --points-at <object> print only branches of the object -i, --ignore-case sorting and filtering are case insensitive --format <format> format to use for the output
最新发布
03-21
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值