There are also some very useful links in Development/Git For LibreOffice Developers - The Document Foundation Wiki which will help.
Probably the best known is GitHub, however Code, test, and deploy together with GitLab open source git repo management software | GitLab is also a strong contender and has some distinct advantages over GitHub.
if you need to change your directory structure then do the following:
git statuswill reveal what you changed
git add --alladds the new directories
git commit -m "suitable descriptive message"to commit locally
git pushto send to code up to the central server
Sometimes when working with GitHub or other git repositories you want to merge your changes into one commit instead of several. Let me explain, in the context of GitHub.
I created a fork of a project, made my changes and submitted a pull request for the repository owner to merge my changes in. However I needed to do a bit more work on the change, so after some comments back and forth with a couple of people I ended up with a number of commits in my fork, which would then, I believe, all appear in the main repository, the owner asked if I could merge/squash these into one commit. So this is what I did:
git log -5, where I had made less than 5 commits
git reset c3c8f8ce568114d7aae1ae263e03390617c7c878
git add filename.extand then
git log -2and check it is as expected
git push --force
There is more information on git reset and other similar command at Git checkout | Atlassian Git Tutorial.
git checkout ./dir/filename.ext - this is a handy way to undo local changes on a specific file, provided the changes have not been committed
git reset --hard - this undoes all local uncommitted changes, removing any extra files
git bisect - used when you need to find when a bug or change was introduced
git config --global http.proxy http://hostname:port - essential when you are behind a proxy server, note that this works when your Git repo is on https
git remote -v - shows the remote repositories
The basic, default Git for Windows client does include a GUI.
I have used SourceTree | Free Git and Hg Client for Mac and Windows a little, it seems to need an Atlassian account to install but after that was fine.
A reasonable code editor and Git client is Visual Studio Code - Code Editing. Redefined which I have found actually works quite well.
I have looked at Git Cola: The highly caffeinated Git GUI but it is more difficult to install on Windows as it needs Git for Windows, Python and PyQt. I got as far as needing
qmake to install PyQt and gave up!
I am planning to investigate Git GUI Client for Windows Mac and Linux | Axosoft GitKraken but it is only free for non-commercial use on Windows, Mac & Linux.
For a very basic "diff with Git" then take a look at Meld.
A number of companies use Bitbucket - the Git solution for professional teams | Atlassian from Atlassian, which was previously known as Stash. It is a Git server, with a nice browser interface that integrates very well with other Atlassian products like Jira and Confluence.
One issue I found was converting the Bitbucket URL to something command line Git could understand. So for example, let's suppose you have a browser open and are looking at your repository and the URL is this
https://stash.example.com/projects/PRJ/repos/REPO/browse, where PRJ is your project key and REPO the name of the repository in it. This translates to the following Git command:
git clone https://stash.example.com/git/PRJ/REPO.git.