Thanks Videonauth for the answers, for my working of this manner:
Put in a terminal:
git config --global user.pass your-password
Where you need to change "your-password" for the password of your GitHub account.
Next put:
git config --global credential.helper store
This create the hidden file:
.git-credentials
and add new values in:
.gitconfig
This is possible see setting your file manager to see hidden files. In Dolphin this is with "Alt + .". In Nautilus, Thunar, Caja is with "Ctrl + H":
Note: If you want to see the content you can open with right clic and open with Gedit
Next make the script to commit and push via batch file. Open Gedit
and paste:
#!/bin/bash
### project 1 ###
cd /all/the/path/where/is/you/git/repository
git add .
git commit -m "Automatic save commit initiated at $(date)"
git push origin master
### project 2 ###
cd /all/the/path/where/is/your/other/git/repository
git add .
git commit -m "Automatic save commit initiated at $(date)"
git push origin master
remember you must change the path for all the path where your repositories are, see this example:
Note: You can do this with all repositories that you want. In this example is for two repositories, but you can do it for four or five, only copy and paste and change the values.
save in your HOME with this name:
autosave-script
then put in the terminal:
chmod 755 autosave-script
next if you want to see what all happen, put in terminal:
./autosave-script
See this picture to help understand:
this show all happen:
but is not necessary, just double click to make it work: