Don’t forget to add .gitIgnore file in IOS/Swift:-
If we are using git, you can simply make git ignore files to untrack files. For a .gitignore file, you should place it in the root folder of the repository. When making commits to any Git repository, you’ll choose the files you want to stage and then you’ll commit them.
But you might not want to commit every single one of your files—there are files that never need to get committed. This is where the .gitignore file is useful: it tells Git exactly which files to ignore and never track.
Let’s get started:-
What is gitignore?
You can create a .gitignore file in your repository’s root directory to tell Git which files and directories to ignore when you make a commit. To share the ignore rules with other users who clone the repository, commit the .gitignore file into your repository.
- Open Terminal.
- Navigate to the location of your Git repository.
- Create a .gitignore file for your repository.
The .gitignore file itself is a plain text document
- edit your .gitignore file
Command:- vim .gitignore
- Create a .gitignore file for your repository. (By pasting this command in terminal)
Command:- touch .gitignore
Note:- Project folder run (To show hidden files)
Command :- Command + shift + .
The entries in this file can also follow a matching pattern.
- * is used as a wildcard match
- / is used to ignore pathnames relative to the .gitignore file
- # is used to add comments to a .gitignore file
This is an example of what the .gitignore file could look like:
Some Important file ignore for iOS/swift :
Some Important file ignore for flutter :
# Android related
How to Untrack Files Previously Committed from New Gitignore:-
To untrack a single file, ie stop tracking the file but not delete it from the system use: