I'm very new to using git, so I understand this may seem like a simple question or one that's been asked before, but I can't word it to get an answer. Anyway.
My thoughts are that I code on my laptop, at the minute when I want to put my program on a server, which happens to be the raspberry pi sitting under my desk, I simply SCP to it.
I was wondering how using git I can update files in a directory. For example all I need to run the bot is two files.
pi@raspberrypi:~/gitDiscordBot/Jarvis $ ls -a
. .. bot.py .git .gitignore Insult.txt README.md
This is the result from simply cloning the repo, however I don't need most of these files/directories. I don't need .git, .gitignore or README.mb. I also need to keep a credentials.json file in tact that isn't in the repo as it contains sensitive data accessed by bot.py.
What's the best way to make some sort of 'update' function that simply grabs the files bot.py and any other files that I need, in this case Insult.txt, replace the existing copies and keep credentials.json untouched, without other redundant git files.
I understand, this may not be the best approach, I'm looking to find the best approach, so please feel free to contradict what I'm saying, I don't know if keeping the git repo is a good thing for example. But all I simply need is the latest versions of bot.py and the other files in a directory so I can run them on my pi.
Such that
$ ls -a
. .. bot.py Insult.txt credentials.json