Closed rdunning75 closed 5 years ago
Instead of adding the files to .gitignore, you can run the following command:
git update-index --assume-unchanged
Another thing you can do, is after doing "git add ." (the . means that ALL the changes should be staged for commit) run a "git status" to see which files are green. if you see a change that shouldn't be green (ex: the application.properties file changes), do "git checkout -- pathtofile". That will UNSTAGE the file. If you run "git status", that fill will go back to being red, and wont be pushed when you make the commit.
Thanks for advice. I could also just have used git checkout — filename.whatever to ignore the changes before using git add .
On Thu, Sep 27, 2018 at 10:11 AM Pranil Dahal notifications@github.com wrote:
@PranilDahal approved this pull request.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/PranilDahal/SocialMediaApp/pull/50#pullrequestreview-159550259, or mute the thread https://github.com/notifications/unsubscribe-auth/Ad2S5Rfr1W2jHjLL2ymeQFAxlO2bC-lgks5ufQa3gaJpZM4W55MV .
Hey, Pranil. Quick question. Since we don't want to add any changes to. gitignore (or push gitignore at all), can we just use git add *?
On Thursday, September 27, 2018, Pranil Dahal notifications@github.com wrote:
Instead of adding the files to .gitignore, you can run the following command: git update-index --assume-unchanged This will ignore all the local changes you make to the file. Any change you make on that file will be ignored.
Another thing you can do, is after doing "git add ." (the . means that ALL the changes should be staged for commit) run a "git status" to see which files are green. if you see a change that shouldn't be green (ex: the application.properties file changes), do "git checkout -- pathtofile". That will UNSTAGE the file. If you run "git status", that fill will go back to being red, and wont be pushed when you make the commit.
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/PranilDahal/SocialMediaApp/pull/50#issuecomment-425170775, or mute the thread https://github.com/notifications/unsubscribe-auth/AYSlgDPSjuJmEGAq62u1mauJBIRq9S3jks5ufQaNgaJpZM4W55MV .
yeah, i didnt even know about that * command lol. you can use that too!
Oh lol. Alrighties I'll stick to that!
On Thu, Sep 27, 2018, 2:54 PM Pranil Dahal notifications@github.com wrote:
yeah, i didnt even know about that * command lol. you can use that too!
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/PranilDahal/SocialMediaApp/pull/50#issuecomment-425255465, or mute the thread https://github.com/notifications/unsubscribe-auth/AYSlgEVFRG6JR09zEgCmf1K5OY2Lb1Myks5ufUkbgaJpZM4W55MV .
Did i fix what you wanted?