Let's suppose we have a file which we are heavily changing. So in case of trial-and-error, we write something for testing. which we don't want to send to commit or even get noticed by git. like
function testThis(){
console.log('helloworld');
}
I write this function, this is part of a very big file. during staging this change will be considered. Since there are many changes like this in a file. So it is possible that during hand picking which change to stage, this change might get staged by mistake.
So my question is: Is there any wrapper or something that is particular to git, in which if I wrap this code, then this change will not even be considered for staging, let alone for committing. something like
<.gitignore>
function testThis(){
console.log('helloworld');
}
</.gitignore>