Answers for "git exclude file from commit without gitignore"

1

exclude/prevent file from commit using git ignore

#To prevent a file from being committed to a repo:
#1. Create a text file in the directory where your project files are located.
#2. Name the file '.gitignore'. Note, there is a period(.) before the name.
#3. Enter the names of the files you want git to ignore in the .gitignore txt file.
#4. Voila, git will always not commit any file you listed in .gitignore
#but will still be available in your working directory
Posted by: Guest on September-06-2021
0

git exclude some files from git commit

To exclude some files from git commit
-----------------------------------------------
syntax  - git update-index --assume-unchanged <filepath>
example - git update-index --assume-unchanged default/config.php

To undo the above command
-----------------------------------------------
syntax  - git update-index --no-assume-unchanged <filepath>
example - git update-index --no-assume-unchanged default/config.php
Posted by: Guest on January-14-2021

Code answers related to "git exclude file from commit without gitignore"

Code answers related to "Shell/Bash"

Browse Popular Code Answers by Language