0

I'm trying to perform the equivalent of a Subversion checkout to a revision. In SVN, this is one step. According to How to clone git repository with specific revision/changeset? I am supposed to be able to git remote add origin url://to/source/repository:

# git remote add git://sourceware.org/git/binutils-gdb.git
usage: git remote add [<options>] <name> <url>

    -f, --fetch           fetch the remote branches
    ...

Here's the information I have to work with:

Could you try whether applying the patch I pointed at (e0fd7c47bd) on the 7.10
branch fixes the internal error?

I'm guessing he means GDB's Git, and the revision hash is e0fd7c47bd.

How do I make Git accept the URL provided by the project?

Community
  • 1
  • 1
jww
  • 97,681
  • 90
  • 411
  • 885

2 Answers2

4

You need to name the remote, so you could do:

git remote add sourceware git://sourceware.org/git/binutils-gdb.git

ryanpcmcquen
  • 6,285
  • 3
  • 24
  • 37
  • 1
    Thanks. Yet another error when adding a name like *`xxx`* just to satisfy this tool. Its not worth trying to figure out. I asked them to close the bug report. Another +1 to Git, which took a completely simple task and made it a complete waste of time. – jww Sep 22 '15 at 17:04
  • 2
    @jww you've gone an over-complex route to do something very simple, bit inappropriate to blame the tool =). – AD7six Sep 22 '15 at 18:55
  • @AD7six - they (the Binutil/GDB folks), want a specific patch tested - `e0fd7c47bd`. Under Subverions, I would do a simple one liner: `svn co -r e0fd7c47bd https:////sourceware.org/git/binutils-gdb`. We can't go that in Git, which chooses to make it a multistep process and add additional useless requirements, like names. – jww Sep 24 '15 at 00:02
  • You could just download the patch and use `git apply`. – ryanpcmcquen Sep 24 '15 at 00:59
3

I'm trying to perform the equivalent of a Subversion checkout to a revision

This is much simpler than the question implies. It's two steps:

$ git clone git://sourceware.org/git/binutils-gdb.git
$ cd binutils-gdb
$ git checkout 7.10

Unless there is a problem doing the above, nothing else is required.

AD7six
  • 63,116
  • 12
  • 91
  • 123