git vs github for remote repositories and branches #64867
-
Hi, I am relatively new to git and github. I am looking at using git as a replacement for Subversion, for small team development. We would certainly need to use a remote repository, to mimic Subversion's centralised repository. I think a simple workflow would be sufficient, such as the GitHub flow. If we worked purely in git I think we would have to create remote branches to connect to the remote repository. That, together with the complexities of merging and rebasing, looks quite daunting. Does GitHub actually help to make this process easier? I understand that GitHub hosts repositories but I don't really understand how it can replace native git commands and improve the user experience. |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 2 replies
This comment has been minimized.
This comment has been minimized.
-
FYI you don't really need to rebase, and I wouldn't really recommend it for git beginners. It's a powerful tool to keep your git history clean, but even a messy git history is useful 😆 GitHub certainly makes Git more beginner-friendly. The UI elements will steer you towards the most commonly used git features, and all you really need to track your history. GitHub also functions as an issue tracker, so you can raise an issue, discuss it, make a PR linking the issue, discuss the code changes in a reivew, and merge when ready. GitHub also provides GitHub Actions so you can run automated tasks -- probably the most common would be running build and test commands on PRs to assert that the PR doesn't break anything. Though my personal favorite is GitHub Codespaces: a cloud computing development instance with standardized configurations. This way you know you have the correct tools installed when working in a codespace. I'd recommend looking into forking instead of working with a centralized repo, as it's going to be a lot more mistake-proof -- if someone messes up the repo severely, they've only messed up their fork, not the main repo. There really isn't much of a difference in your workflow if everyone works on their personal forks vs. everyone working on their own branches in the same repo. Code, commit, push, make a PR, merge the PR. Forks will give your contributors more freedom to play around. For example they can experiment with force-pushing without worrying about destroying the main repo's history. |
Beta Was this translation helpful? Give feedback.
-
It's help me alot. Thx |
Beta Was this translation helpful? Give feedback.
Absolutely, using Git and GitHub for small team development can greatly improve your collaboration and version control processes. It's understandable that transitioning from Subversion to Git might seem a bit overwhelming at first, but Git and platforms like GitHub offer a more flexible and powerful approach to version control.
Here's how GitHub can make the process easier and improve your experience:
Remote Repository Hosting: GitHub provides a remote repository where your team can collaborate on code. This central repository serves as a single source of truth, similar to how Subversion's central repository works.
Simplified Workflow: GitHub simplifies and streamlines the process of coll…