Saturday, June 8, 2019

working remotely with git repos

The process we play in git is as follows:

The first time (or whenever he wants) the person clones the code of each project on his / her PC with the command:

git clone http://git.techasoft.gr/<organization>/<project>

If desired, it can download the entire project as a zip file from git.

 So he creates a local copy of the project file in git on his PC. There (in the local copy on his / her PC) he can open and edit the files, put his / her own pieces of code, correct somebody else's code, generally modify, add, delete files and folders. Once the work of the day has been completed in its local copy (on its PC), the following commands are run in the project folder:

git add.
git commit -m "<Message of the job done>"
git push

With these commands, the authorized user sends jobs back to git (modifications, additions, etc.) to his local copy (on his / her PC). These changes are integrated into the git project folder.

After the first time and if there is a local copy on our PC, in the project folder, BEFORE we start any work, we run the command:

git pull

so we can download the latest updates that are probably made by other users to the project file and start our work with the latest updates in our local copy (on our PC).