Getting started with GIT
Setting Up Accounts on GitHub and GitLab
In the world of game development, managing and collaborating on complex projects requires robust version control systems. Git, a popular distributed version control system, allows multiple developers to work on the same project without interfering with each other's progress. While Git's command-line interface is powerful, it can be intimidating for beginners and cumbersome for those who prefer a graphical user interface (GUI). This is where Git clients like Git Hammer come into play, providing a more intuitive and user-friendly way to interact with Git repositories.
Before diving into the world of Git and taking full advantage of Git Hammer, there are several preliminary steps you must undertake. These include setting up accounts on platforms like GitHub and GitLab, creating and initializing repositories, and making the initial commit with essential files such as .gitignore
and README.md
. These steps are crucial as they lay the foundation for your game development project's version control structure and allow you to manage your project more effectively using Git Hammer.
Git Hammer is designed to streamline and simplify your Git workflow, offering a visually appealing and more manageable approach to tracking changes and collaborating with others. However, to harness the full potential of Git Hammer, you first need to have your repositories properly set up and ready to go. This introduction will guide you through setting up your accounts on GitHub and GitLab, creating repositories, and making the initial commit, which are prerequisites to getting Git Hammer up and running for your game development projects. By following these initial steps, you will ensure that your transition to using Git Hammer is seamless, allowing you to focus more on development and less on managing your project's version control.
GitHub:
- Navigate to GitHub: Open your web browser and go to GitHub's website. Click on the "Sign up" button in the top right corner.
- Create an Account: Fill out the form with your email address, a password, and your desired username. GitHub usernames are unique and will represent you in the GitHub community.
- Verify your Email Address: After signing up, GitHub will send you an email to verify your email address. Click the link in the email to complete the verification process.
- Set up your Profile: Add information about yourself, such as your name, bio, and a profile picture. This step is optional but recommended, especially if you plan to collaborate with others.
GitLab:
- Navigate to GitLab: Go to GitLab's website and click on the "Register" tab.
- Create an Account: Enter your details, including your email, a password, and your desired username. As with GitHub, your username should be unique and reflect your identity within the GitLab community.
- Verify your Email Address: GitLab will also send a verification email. Click on the link provided to activate your account.
- Set up your Profile: Similar to GitHub, you can add personal details to your GitLab profile to make it easier for collaborators to recognize you.
Write down these account details, as we are going to need them shortly :)
Setting Up Repositories
GitHub:
- Create a New Repository: Once logged in, click the "+" icon in the top-right corner and select "New repository". Name your repository, add a description, and choose whether it will be public or private.
- Initialize the Repository: You can initialize the repository with a README file, which is recommended as it provides information about your project. Additionally, select a license and a
.gitignore
template if applicable. For game development, you might choose a Unity or Unreal Engine.gitignore
template.
GitLab:
- Create a New Project: In GitLab, repositories are called "projects". Click on "New project", give it a name, and decide on its visibility (public or private).
- Initialize the Project: Similar to GitHub, you can add a README file during creation. GitLab also allows you to choose a license and a
.gitignore
template. Select the appropriate options for your game development project.
Making the Initial Commit
After setting up your repository, the next step is to launch Git Hammer on your local machine and make the initial commit. This process is similar for both GitHub and GitLab.
- From the Cloud to your PC: Start Git Hammer (if you don't have it yet, you can grab it from here, you will be greeted with the first time setup guide. complete the setup steps, and you should be good to go
- Create a
.gitignore
File: If you didn't initialize your repository with a.gitignore
, create one in the root directory of your project. This file tells Git which files or directories to ignore in your project. For game development, you might want to exclude build directories, temporary files, and other non-source materials. We use this gitignore file: https://github.com/github/gitignore/blob/main/Unity.gitignore simply copy that file (or the gitignore for your engine) into the root folder of your project. - Create a
README.md
File: If you didn't initialize your repository with a README, create one now (in the root folder of your project). The README should contain information about your game, how to set it up, and any other relevant information for collaborators or users. - Get the change to the cloud: Finally, push your changes to the cloud, on Git Hammer, you can do this by pressing the "Submit my work" button. You will be promted for a message "what did you change"; insert what you did into this textbox, this makes it easier to see what you did when when borwsing the project history. For this commit, you can put in the message "Initial commit".
Congratulations! You have now successfully set up your accounts on GitHub and GitLab, created your first repositories, and made the initial commit using Git Hammer, marking the beginning of your game development project's version control journey. By accomplishing these preliminary steps, you've laid a solid foundation for your project and streamlined your workflow, enabling a more organized, collaborative, and efficient development process.
Remember, the initial setup is just the beginning. As you dive deeper into game development, continue exploring the features and functionalities of both GitHub and GitLab to enhance collaboration with your team. Leverage the power of Git Hammer to manage your repositories more effectively, making your version control experience smoother and more intuitive.
As you progress, maintain regular commits, keep your repositories organized, and communicate effectively with your team members. These best practices will help you manage your project's evolution and ensure a successful development cycle.
With the right tools and a proactive approach, you're well on your way to turning your game development dreams into reality.
Good luck on your development journey, and happy coding / designing / composing / creating!