I had a problem with go-modbus
in an issue in Github.
Author suggested me to use:
$ go get github.com/goburrow/modbus
instead of
$ git clone https://github.com/goburrow/modbus.git
What is the difference between that two commands?
The git checkout command may occasionally be confused with git clone . The difference between the two commands is that clone works to fetch code from a remote repository, alternatively checkout works to switch between versions of code already on the local system.
When you download the repo it just gives you all the source files with no . git so you dont have the repo. When you clone you get a copy of the history and it is a functional git repo.
To sum it up, clone is for fetching repositories you don't have, checkout is for switching between branches in a repository you already have. Note: for those who have a SVN/CVS background and new to Git, the equivalent of git clone in SVN/CVS is checkout . The same wording of different terms is often confusing.
The git clone
command will clone a repo into a newly created directory, while go get
downloads and installs the packages named by the import paths, along with their dependencies.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With