Unable to checkout old branch from a fresh clone

Do you have a question about makefiles, a compiler or IDE you are using and need to know how to set it up for wxWidgets or why it doesn't compile but other IDE's do ? Post your questions here.
salem
In need of some credit
In need of some credit
Posts: 2
Joined: Fri Feb 22, 2019 5:41 am

Unable to checkout old branch from a fresh clone

Post by salem »

Hi all,

So I've been busy developing my app quite happily on Linux.
But now is the time to try the windows port.

Now my Linux version is built around 3.0.2 version WxWidgets, so I thought I would start there.

So, I followed the instructions at https://www.wxwidgets.org/develop/code-repository/

Code: Select all

$ git clone --recurse-submodules https://github.com/wxWidgets/wxWidgets.git
Cloning into 'wxWidgets'...
<<<snip the usual git messages>>>
Submodule path '3rdparty/catch': checked out 'b46f260f810bb693825c026269636e82b0a50722'
Submodule path 'src/expat': checked out 'b99766ce61f2cefa0ada22204765c1bf08802216'
Submodule path 'src/jpeg': checked out 'e951f6ed6373d3c8d550755e4ec00adadc878aca'
Submodule path 'src/png': checked out '772e393c7eb95f0424d2d895abd5f8ad0131f500'
Submodule path 'src/tiff': checked out 'c70cb3d7b4c861083cdc0b6f245f3830c6e42566'
Submodule path 'src/zlib': checked out '5888671274cde770edbe683b435f052de2b03681'

$ git checkout  WX_3_0_2
error: The following untracked working tree files would be overwritten by checkout:
        src/jpeg/README
        src/jpeg/change.log
        And the rest of the files in src/jpeg and src/png

$ git status
On branch master
Your branch is up to date with 'origin/master'.

nothing to commit, working tree clean
All the sub-modules are in a HEAD detached at xxxxxxxx state, the numbers match those listed in the initial clone.

About my environment
  • Windows 10 - 64-bit
    MSYS2 command line.
I also have installed
  • code::blocks 17.12
    Visual Studio 2017
Did I miss out some necessary git command / configuration?

Since I also need to integrate with Boost, POCO and pylib, I'm wondering if the path of least resistance is to make a visual studio solution for my own project.

Thanks.
DavidHart
Site Admin
Site Admin
Posts: 4254
Joined: Thu Jan 12, 2006 6:23 pm
Location: IoW, UK

Re: Unable to checkout old branch from a fresh clone

Post by DavidHart »

Hi,

The new submodules thing is a problem when reverting to a pre-modules commit. You can probably fix it by doing:
git submodule foreach --recursive git reset --hard

However:
1) It looks as if there's a wx3.0.2. tarball here
2) Why use wx3.0.2 anyway? You don't need exact version matches across platforms. Why not wx3.0.4?

Regards,

David