I have a central git repository that everyone pushes to for testing and integration, but it only is pushed to when features are 'ready'. While in the middle of a big task, developers frequently have many commits that stay on their hard drives.
Sometimes in the middle of these projects I'd like to either see what another developer is doing, or show him how I've done something. I'd like to be able to tell another developer to just "pull my working copy".
The only way I can think of is having everyone run SSH on their development machines and adding accounts or SSH keys for everyone, but this is a huge privacy and permissions nightmare, and seems like a lot of work to maintain.
Should we just be pushing to that central repository in these cases? Should we be pushing after every local commit?
Under your repository name, click Settings. In the "Access" section of the sidebar, click Collaborators & teams. Click Invite a collaborator. In the search field, start typing the name of person you want to invite, then click a name in the list of matches.
Create a Collaborative Repo Go to the repository settings (click the Settings tab in your repository or go to: https://github.com/<username>/hello-world/settings/access ) and then invite your partner to have access to the repository. Your partner will need to go to their email to accept the invitation.
Two common approaches:
We use branches for code that isn't "ready" yet, and the branches get pushed to a central repo (which is backed up!). When a new feature becomes "ready" it gets merged into the master
branch.
One of the benefits of using git is that it is very, very easy to create and merge branches, plus you can visualize what's happening using gitk
. Recommended!
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With