Follow

git question 

I'm working in a repository made by someone else, and it includes a build file.

This build file should NOT change upstream, however in order for it to build on my system I needed to make some OS-specific changes to the file.

Is there a way to tell git "hey, don't commit this file, and just leave it the way it is" without either removing my modifications to the file or sending my modifications upstream?

git question, addressing everyone's responses 

Unfortunately it's part of a build system, so I can't rename it - it has to be stack.yaml

I can't set it to work on both because I need these lines on my system:

nix:
enable: true

and those lines don't work without nixos.

I can't use the global gitignore because I have stack.yaml in other repositories that use stack, and I have to commit the file in those.

and the .git/info/exclude file doesn't seem to work

re: git question 

@lizardsquid the gitignore is one option, but that usually gets committed as well. what would be better is to stash that file while pushing

re: git question 

@rachel the problem is I keep having to revert my branches because I accidentally type "git commit -a"

(because I'm used to a mercurial workflow)

re: git question 

@lizardsquid

not exactly, sorry. sigh

i don't think git is good because a lot of this shit

re: git question 

@rachel yeah, I find git gets in the way a lot more than it should

git response -- Take with pinch of sault 

@lizardsquid Tere's a per-repo .gitignore file that SHOULD work! Just put each file you don't want committed, and it SHOULD NOT push those files for you.

git response -- Take with pinch of salt 

@lizardsquid (That took me like 4 mins to make sure about because setting up a a fresh install and my ssh keys weren't set properly, ugh) An example in a stupid hacked together project that I've made before: github.com/Whovian9369/OTPKeyS

git response -- Take with pinch of salt 

@lizardsquid Hah looks like I'm super late to that party. Sorry!

git question, another thing to try 

@lizardsquid All right, if exclude isn't working, try the command: `git update-index --assume-unchanged stack.yaml`

git question, another thing to try 

@Terrana @lizardsquid this is the command you want

Sign in to participate in the conversation
Computer Fairies

Computer Fairies is a Mastodon instance that aims to be as queer, friendly and furry as possible. We welcome all kinds of computer fairies!