1
Well, I’m working on a project in college and I had some problems with using git when synchronizing a repository. More precisely, I received the following usage instructions:
- The Master branch is the primary and should never receive an unnecessary/irresponsible/test push/pull request.
- First of all, update the repository. Remember that your Fork is not automatically synchronized with the project.
- Always update your repository before you start coding and always keep your code as up-to-date as possible to avoid conflicts.
I followed some tutorials on the synchronization internet as for example what the github itself makes available (for those interested: https://help.github.com/articles/syncing-a-fork/#Platform-linux), but almost all of them are in English, which makes my understanding difficult to some extent (even with the translations it gets a little difficult to understand ) and few really explain how I synchronize MY repository that was "forkado" with the MAIN repository of the project. Can someone help me or give me some way to go? It is worth mentioning that I use Linux. Thanks in advance. :)
To keep your project up to date, simply clone the
git
on your machine, it brings the current status of the updated project.... Every time you turn on your machine, and start changing the project, Sincronize, it pulls all the updates,branchs
maids andcommits
performed by other persons in the repository. If you ever see for any reason that there are many different files on your desktop, files with changes that were not yours, just remove the folder from your machine, and clone the repository’sgit
again.– MarceloBoni
Just one more tip: The commands of
git
are the same both tolinux
, as for 'windows', I use the graphical version ofwindows
and I’ve never had any problems, people who come from the universeLinux
see more ease in working with the versionGit shell
, that is available in both environments as well.– MarceloBoni
So, we are working with different repositories, and I always have to synchronize MY repository with the MAIN repository from where I "forkei". In my opinion, deleting and cloning the repository ends up being seen as "gambiarra", since there are processes that have been created precisely to facilitate the solution of this problem. I just want to know what commands or procedures I should take to "optimize" my production.
– Oak
fork
in my understanding working with the tool, are precisely thebranchs
which differ frombranch Master
, after you do all thecommits
, and give apush
orpublish
, Voce should give amerge
in thebranch
so that yourbranch
is included inbranch master
, if the owner of the repository, or yourself, disregards thebranch
, simply remove the same which does not affect at all the state of thebranch master
– MarceloBoni
The intention is not this, to keep deleting and cloning hausahsuh the ideal is just to give a
sync
that the project on your machine will be updated, as long as it is with an internet connection, it already downloads the files that do not have in your machine, this ruse to remove from the machine and clone again, it is only if you see that there is something wrong (Type 3 persons working on the same project, having an approval environment, a production environment, and thegithub
for versioning control, sometimes if the team does not communicate, it may occur)– MarceloBoni