DevOps Articles

Curated articles, resources, tips and trends from the DevOps World.

One Neat Trick to Make All Your Windows — Linux Issues Disappear

4 years ago levelup.gitconnected.com
One Neat Trick to Make All Your Windows — Linux Issues Disappear

Summary: This is a summary of an article originally published by the source. Read the full original article here →

A lot of problems arise when people with Windows machines and people with Linux machines work on the same code base. Or when people with Windows machines are pushing code that eventually needs to get deployed to a Linux server.

By default, Git Bash (git for Windows) converts line endings for better interoperability with Linux systems.

You can do this in Notepad++ with the appropriate Find and Replace operation: For adding the right permissions, you’ll have to do that in a Linux machine: Even though you can run chmod commands in Git Bash, it doesn’t seem to have any effect: Once all of that is done, you can tell git to treat the .sh files as binaries by adding a .gitattributes file to the root of the repo . This .gitattributes file needs to have only one line in it: You can do this with Git Bash: And that’s it!

Made with pure grit © 2024 Jetpack Labs Inc. All rights reserved. www.jetpacklabs.com