How to login to Azure DevOps (Quick Tip)
Due to the complexity of Azure services, it's often not obvious how to log in to Microsoft's Azure DevOps portal. This quick tip will show you how.
A .gitignore file is a central component for managing your Unity projects using Git, which is also the foundation of GitHub. It is a set of rules that tells Git which files to exclude from version control. It needs to be customized for each game engine. We also have a .gitignore template for Unreal Engine.
Without it you would upload too many unnecessary files into your repository. Files in folders like Library, Temp or Logs are generated locally during your work and clutter up your repository if included. By excluding these from version control, your repository stays clean and efficient.
Download this .gitignore file and paste it to the root folder of your project. When you open it, you will see a set of rules that are specific to Unity. A .gitignore file for a Unreal Engine or a Godot project will look differently. This gitignore file works even if your Unity project is in a subfolder of your Git repository.
The rules in the .gitignore file should apply to everyone on your team. Therefore, the next step is to commit and push it to the repository. Afterwards, everyone should pull your commit containing the .gitignore file. In most cases, you won't need to modify it further.
If you have specific requirements, you can tailor your .gitignore file accordingly. For example, some people choose to ignore tools and plugins from the Unity Asset Store, while others may not. To customize, simply use a text editor to add rules. Each rule is defined by a pattern, which includes the following symbols:
By adding an exclamation mark "!", you allow files and folders to be included, even if they were previously ignored.
If you already committed wrong files, that should be on a .gitignore, you need to follow these steps:
Just adding the file to the .gitignore won't be enough, because you have to remove that file from the Git history. If you are unfamiliar with the terminal, you can just launch it from your project folder.
If you need a personal .gitignore that isn't shared with the team, you can use a special file located in the hidden .git folder. Inside this folder, navigate to the info directory. Here, you'll find a file named "exclude". You can modify this file using the same rules as .gitignore, but the key difference is that these rules will only apply to your local environment and won't be shared with your team.