What is GitHub?
GitHub is a cloud-based platform for versioning software based on Git versioning. GitHub online repositories are very popular and therefore widely used.
GitHub remote repositories
While the Git environment on your local computer represents your personal development environment, GitHub is a platform for remote repositories. A remote repository is a remote repository on another host to which you transfer your development files. On GitHub.com you can share your repositories with other developers to develop your software as a team.
GitHub is a version control system
GitHub – including GitLab and the original version Git – are version control systems, or VCS for short. With just a few versioning processes and a few simple commands, you can achieve great advantages in software development through Git-based versioning.
“For you as a software developer, it’s only a small step to versioning with Git, but for every agile software project in a team, Git versioning is a big step – a milestone!”
SaschaBlock – Software Architect
Why is software versioning so important?
Using a Git VCS not only solves many common problems when writing code, but also significantly improves the entire software development process. By tracking your code development with a Git and hosting your code online, you can make software development transparent, reproducible and open for collaboration in agile teams.
How does Git versioning work?
To understand Git, GitHub or GitLab, the first step is to learn how to version your own source code. Traditionally, Git is executed from the command line – like a Unix shell. There are now numerous graphical user interfaces (GUIs) available for running Git.
Control Git via shell command
However, to perform advanced operations and use Git on a remote computer, it is necessary to learn how to use Git via the command line.
Install Git
If you have just installed Git, the first thing you need to do is enter some personal details, as Git records who makes individual changes to a file. Of course, a large number of files or directories can be versioned in one go. In all these change files, not only is your “identity stamp” noted, but also the exact changes you have made. This is, after all, the purpose of versioning. So specify your name and e-mail address by executing the following lines, replacing “First Last” and “user@domain” with your full name and e-mail address respectively
$ git config --global user.name "Vorname Nachname"
$ git config --global user.email "user@domain"
To start versioning your code with Git, navigate to a directory that you create specifically for Git. From this local directory, you will version your source code in the future, regardless of whether this is done in the direction of GitHub, GitLab or elsewhere.
git init
Execute the git init command to initialize the current folder as a Git repository.
Git repository and repository directories
A repository, or repo for short, refers to the current version of the tracked files as well as all previously saved versions. Only files located within a repository directory use the potential to be version controlled, i.e. Git ignores all files outside the initialized directory. For this reason, projects under version control are usually stored in a single directory that corresponds to a single Git repository. Of course, a repository directory also includes the subdirectories it contains. In addition, there are many other strategies for the optimal organization of your own software projects and software releases.
The most important Git commands – Your Git vocabulary
Git is a powerful tool that can revolutionize your software development – provided you know the most important commands. From “commit” to “pull” to “merge”: In this section, you will learn the basics of an efficient Git workflow so that you can version your projects securely and traceably.
Commit
The commit is a snapshot of the changes you have made to the stage files. A commit in a Git is, so to speak, a backup of your memory status in the Git project with all the changes you have made to the stage files. All changes are saved with the commit command. The highlight – just like a backup, you can return to this status at any time. Smart, isn’t it?
Stage
A stage – also known as the staging area – contains the files that are to be included in the next Git transfer. With staging, you define a file for the next transfer to the remote Git repository.
Track
When you track a Git file, you track its changes and are informed of every such change. A tracked file is a Git element that is recognized by the Git repository as a single element.
Branch
A branch is a parallel version of the files in a repository.
Local
As explained at the beginning, your development files are always stored locally on your machine in the version of your repository, i.e. on your personal computer.
Remote
The remote is the version of the repository that is stored on a remote host – such as a server. This remote repo can be located on GitHub or GitLab or anywhere else. A URL or URI addresses this remote address.
Clone
A clone is a local copy of a remote repository that you have created from your computer.
Fork
A fork is a (modified) copy of a repository and can be created by you or another user. It is a common strategy to fork a GitHub project and thus copy a 1:1 copy of this Git project as an archive. You can also transfer or merge a Git repo from another GitHub user’s GitHub account to your own
.
Merge
A merge is a versioning strategy for merging version files. With the Git merge, you update a Git project by merging the changes introduced in new commits.
Pull
You use pull or the pull request to retrieve modified files from a remote repository via commits and transfer them to your local repository. The release files are therefore merged in the direction of your development environment.
Push
You send a commit from your local repository to a remote repository via push or push request.
Pull Request
The pull request is a request in the form of a message sent by another GitHub user to include the transfers in their remote repository in the remote repository of another user. Pull requests are therefore used to grant permission for versioning into a remote repository.
Is Git versioning only suitable for code?
Git is not limited to code alone! There is no reason why this framework has to be limited to code only; a VCS is well suited for tracking any plain text file:
- Manuscripts
- Technical specifications
- Protocols
Is the Git versioning always public?
The owner of a repository decides whether a Git versioning is publicly viewable or private and therefore not publicly viewable. The authorization control of repositories is diverse and offers a solution for every conceivable requirement. Or to put it another way: There is no, no good reason at all not to version software and source code via Git. When programming Git is indispensable. With this in mind: Happy Git versioning ;-)
Collaboration on GitHub: from solo projects to global teams
One of the biggest advantages of GitHub is the ability to bring teams together worldwide. With functions such as Pull Requests, Issues, Discussions and Wiki, GitHub becomes a platform for collaboration that goes far beyond mere versioning. Especially in agile software projects, GitHub is a central place to efficiently organize feedback, code reviews and discussions.
Automation with GitHub Actions
GitHub goes beyond pure version control: With GitHub Actions, you can integrate CI/CD pipelines (Continuous Integration/Continuous Deployment) directly into your projects. This allows you to automate builds, tests and deployments, saving time and reducing human error. Whether you are automating tests, building containers or deploying code directly to the cloud, GitHub Actions offers a powerful automation platform.
Ecosystem and integration: GitHub as a central DevOps platform
GitHub offers a variety of integrations, including:
- GitHub packages for the management of dependencies.
- Codespaces for cloud-based development environments.
- Security alerts to detect and fix security vulnerabilities in your dependencies. These tools turn GitHub into a comprehensive DevOps platform that supports the entire development cycle.
Best practices for the use of GitHub
- Commit messages: Write clear and precise commit messages to make changes easy to understand.
- Branching strategies: Use a clear branching strategy (e.g. GitFlow) to organize parallel development threads efficiently.
- Code reviews: Use pull requests to have the code reviewed by other team members – this improves code quality and promotes knowledge transfer.
- Tags and releases: Create tags and releases to mark specific versions of your project, e.g. for milestones or public versions.
- Issues and Projects: Use Issues for bug reports and feature requests and organize your work with GitHub Projects to prioritize tasks and keep track of them.
Why Git is an indispensable tool for successful digitalization
GitHub itself is not a version control system, but a platform based on Git technology and operated by Microsoft.
While GitHub provides useful tools for collaboration, organization and automation, the true heart of any successful software versioning is Git itself.
Git is an essential foundational technology that works independently of platforms like GitHub and gives you control over your code.
It is crucial to first understand and effectively use Git, as it is the foundation for all services offered by platforms such as GitHub, GitLab or Bitbucket.
Start your journey with Git today and discover how powerful and flexible this tool can be for your projects with our YouTube videos on the Rock the Prototype Channel! 🎉
Rock the Prototype Podcast
The Rock the Prototype Podcast and the Rock the Prototype YouTube channel are the perfect place to go if you want to delve deeper into the world of web development, prototyping and technology.
🎧 Listen on Spotify: 👉 Spotify Podcast: https://bit.ly/41pm8rL
🍎 Enjoy on Apple Podcasts: 👉 https://bit.ly/4aiQf8t
In the podcast, you can expect exciting discussions and valuable insights into current trends, tools and best practices – ideal for staying on the ball and gaining fresh perspectives for your own projects. On the YouTube channel, you’ll find practical tutorials and step-by-step instructions that clearly explain technical concepts and help you get straight into implementation.
Rock the Prototype YouTube Channel
🚀 Rock the Prototype is 👉 Your format for exciting topics such as software development, prototyping, software architecture, cloud, DevOps & much more.
📺 👋 Rock the Prototype YouTube Channel 👈 👀
✅ Software development & prototyping
✅ Learning to program
✅ Understanding software architecture
✅ Agile teamwork
✅ Test prototypes together
THINK PROTOTYPING – PROTOTYPE DESIGN – PROGRAM & GET STARTED – JOIN IN NOW!
Why is it worth checking back regularly?
Both formats complement each other perfectly: in the podcast, you can learn new things in a relaxed way and get inspiring food for thought, while on YouTube you can see what you have learned directly in action and receive valuable tips for practical application.
Whether you’re just starting out in software development or are passionate about prototyping, UX design or IT security. We offer you new technology trends that are really relevant – and with the Rock the Prototype format, you’ll always find relevant content to expand your knowledge and take your skills to the next level!