How to use git to do version control when I edit my code in Windows but build and run my code in Linux (using pycharm) - linux

I have a question that I edit my code using PyCharm in Windows platform, and build and run my code in Linux machine, I want to know what is the correct way to do version control using git? My current approach is
using git in Windows
build and run code in Linux
checkout different branches in Windows and upload code to Linux(and not upload binary files such as .o files and .so files)
I'm not quite comfortable with this approach so I want to know the better ways. Thank you!

and upload code to Linux
If your Linux machine is accessible through SSH (and has Git installed), a better option would be to git push your code to your Linux machine, using a:
bare repository
a post-receive hook to checkout/restore your code where you want on said Linux server.
You can see an example here.

Related

For Tauri+Vue development, can I generate Windows exe on Ubuntu dev env?

I'm playing Tauri+Vue development on an Ubuntu box. I clone a small project from https://github.com/DominusKelvin/nota-web, it built out 2 files as below,
* /home/abc/nota-web/src-tauri/target/release/bundle/deb/nota_0.1.0_amd64.deb
* /home/abc/nota-web/src-tauri/target/release/bundle/appimage/nota_0.1.0_amd64.AppImage
Actually I want a windows exe file, is it possible to build out an exe file here? or do I have to do the development on a Windows machine?
Thanks & Regards,
Martin.
To answer your question, it's not possible yet to cross-compile a Tauri application. (Example, building a Windows artifact from a Linux machine)
The best would be to use Github Actions to build it for you.
Tauri have a pre-built action, ready to use.
You can find some examples here;
https://github.com/cloudflare/workerskv.gui/blob/master/.github/workflows/release.yml#L59
https://github.com/Levminer/authme-lite/blob/dev/.github/workflows/release-artifacts.yml#L35

How to download Dark table on Linux Mint, from source code

I am wondering if someone can explain to me how to download programs such as Dark table, using Linux Mint and the source code. I have consulted many sites, but they are not all beginner friendly.
Thank you very much,
Cheers.
Installing open source projects with the source code is nothing beginner friendly. Depending on the software you want to install you need at least basic knowledge of build systems (in case of darktable it's cmake).
A general approach is: Look on the website of the project or the git repo for instructions on how to install manually ( e.g.: darktable: https://www.darktable.org/install/ chapter 'Install from source').
Most likely at the end, it will provide the steps to compile it. First step is always to install the dependencies. After that downloading the provided archives or clone the repo and executing the build commands or the provided build script. Then you most likley will have compiled an executable which you can execute or create a desktop entry for it on your mint desktop.

Linking my own Git server with my Windows Eclipse IDE

I'm trying since two days to set up a private Git and link it with my Eclipse IDE.
First of all, I have a Raspberry running Rasbian as a server. SSH is working with SSH keys.
I created a new user to store my Git projects on. Git is installed too.
My dev computer is running Windows 10 and Eclipse Neon.1 with the Git plugin installed on. I have MSysGit installed too.
And here I can't link anything to make it working well together.
First, I didn't find how can I tell to EGit to use a SSH key. So I wanted to use the Git GUi provided by MSysGit but I don't know how to link it with my server.
I'm not here to ask you to setting up for me or even tell me how to do it step by step, I'm just looking for a detailled tutorial or video which can helps me with it. Most of tutorial I rode use Linux as dev OS, or link Eclipse directly on GitHub so I didn't find a situation like mine.
First you need git setting done in eclipse that provide GUI for git commands.
Then to link local server, add you local git server URL to your project remote URL. and it should be able to pull & push commit to your server.
This tutorial should be enough for all you need.
http://www.vogella.com/tutorials/EclipseGit/article.html
http://monkeyhacks.com/post/raspberry-pi-as-private-git-server

Shared folder between Windows host and Ubuntu guest, long filenames

I'm setting up an Ubuntu guest under Windows using VirtualBox for a colleague to provide him with a Linux-based development environment for a node.js application.
This colleague of mine can't or doesn't want to SSH into the VM and work in emacs or vim; he's a Sublime Text guy. So I have set up the project tree in a VirtualBox shared folder so he can access it from Windows (to edit) and the Linux VM (to build/test).
Unfortunately, npm install fails with file system errors. The problem seems to be extremely long path names resulting from deeply nested node_modules dependencies. I'm guessing we're hitting a Windows limit on filename length. The npm install works just fine in a regular (non-shared) directory in the VM.
Does anyone have ideas about how to deal with this problem? One idea I had was to somehow alias or link $MY_PROJECT/node_modules to another, non-shared location, but I can't figure out how to do that.
Update: I'm going to try this hack: https://www.virtualbox.org/ticket/11976.
Update 2: Ended up using samba, which is probably what I should have done in the first place.
One option is to use one of the multiple ways for sublime to edit remote files over ssh, covered in some detail here
How to use Sublime over SSH
Another is try using the native windows version of node and have your colleague develop locally directly under windows.

Nightly builds for Windows on Linux

Is there a system I could implement on Linux(Debian) to have nightly builds from a github repository targeted to windows(.exe files)?
I know programs like CCNET and TeamCity but they are for windows.
Currently we use Visual Studio 2013 to build our project(We also support Code""Blocks but dont recommend it).
This is how we do it:
Run Jenkins on Linux (Ubuntu)
Run build slaves on several WinXP systems to build the code, this can even be done on your own laptop for example. Of course you need to leave it on overnight.

Resources