how to use git clone to extract a specific branch ?

133 views
Skip to first unread message

Jacky Bek

unread,
Aug 5, 2021, 1:03:28 AM8/5/21
to open62541
I refer to the following  command on

The above will clone the latest version from github.

However, if I want to extract a previous version, what will be the command?
e.g the latest is v1.2.2-372-g6f21ecb4

but when i compile using this version, my application crashed when executing this
 retval = UA_Server_addVariableNode(uaServer, UA_NODEID_NUMERIC(namespaceIndex, 10301),

The funny thing is that it did not cause segmentation fault at the first instance of UA_Server_addVariableNode.  It caused segmentation fault after 20+ nodes are added in the code.. and when i comment out a particular line, the previous line caused segmentation fault.

This behaviour did not happen in previous versions.
That's why I want to retrieve back the previous open62541 versions to try again.

Many thanks.
Jacky

matko...@gmail.com

unread,
Aug 5, 2021, 1:37:53 AM8/5/21
to open62541
You can use git checkout v1.2.2 to checkout the 1.2.2 branch

here the full list of commands
cd open62541
git checkout v1.2.2

Jacky Bek

unread,
Aug 5, 2021, 1:51:12 AM8/5/21
to open62541
Thanks.  After I issue git checkout v1.2.1, i checked the version in open62541.  it says v1.2.1-dirty

How can i check out the 'clean' copy?
Reply all
Reply to author
Forward
0 new messages