Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Stage all but one folder [duplicate]

Tags:

git

I have a project containing a few modules. There were some commits previously.

How do I stage all the files (modified, deleted, created) and folders in the project but the one specific folder and all files in it?

like image 306
Alan Coromano Avatar asked Nov 23 '13 09:11

Alan Coromano


People also ask

How do I stage all files in a folder?

Stage all Files The -A option is shorthand for --all . Another way to do this would be to omit the -A option and just specify a period to indicate all files in the current working directory: $ git add . Note: The command git add .

Can Gitignore ignore folders?

gitignore is a plain text file in which each line contains a pattern for files or directories to ignore. It uses globbing patterns to match filenames with wildcard characters. If you have files or directories containing a wildcard pattern, you can use a single backslash ( \ ) to escape the character.

Which command to use to change the stage the all files?

Enter one of the following commands, depending on what you want to do: Stage all files: git add . Stage a file: git add example. html (replace example.


1 Answers

git add . git reset -- somefolder_to_exclude 
like image 107
Darin Dimitrov Avatar answered Oct 08 '22 20:10

Darin Dimitrov