Github Desktop not detecting db.sqlite - github

I'm currently deploying a Django project to Github using Github Desktop.
All changes are successfully detected and commited, except for db.sqlite3
When I copy that file to "Documents/Github/my-repository", there is no change and I can't commit.
I tried to pull but it doesn't work

Check the file .gitignore to see if that file is not black-listed. The .gitignore file is used to prevent files and directories from being committed. Read more here.

Related

Github desktop caches deleted local repository

I'm new at GitHub and I'm having this issue: I created three private repositories for my project, all fine. On the fourth one, for some reason GitHub desktop included the node_modules folder (its an angular cli app), so I deleted the repository from GitHub.com and from GitHub desktop. When I try to recreate it, it is "cached" on my Mac, even if I copy everything to another folder, and it tries to upload the node_module files.
I also changed the name of the repository, copied all the files but node_modules folder to another folder. Same happens over and over.
I couldn't find anything on internet about this. Sorry if its a newbie question.
You could try to delete the git folder that it's being hidden by default.
Go to in file explore -Views- select "Hidden Items" and try to remove the git folder from here. After that set up your .gitignore file and pass node_modules before you use git init
Use this in your terminal, if you are using VS Code use this in the same folder you are having the problem : git config --global core.excludesfile '~/.gitignore'

Can github desktop be configured to ignore untracked files

Is it possible to configure the github desktop client to show only files that are in the repo, same as what gitk seems to do by default, or similar to running git status --untracked-files=no from the command line?
In some repository directories there are a ton of untracked files that I don't want to delete or add to .gitignore, I just want to 'hide' them when I'm diffing the important files. (I use github desktop only to review changes, not to push or create PRs.)
GitHub desktop is initially not designed to hide all untracked files in a working branch. Unfortunately there is neither a workaround for doing this. Here is the link that talks about adding this change as an update in its future releases.
https://github.com/desktop/desktop/issues/3734

How to re-connect a local github repository I completely overwrote?

I have a Unity project that I messed up badly, so I downloaded the zip file of the latest repository I pushed to GitHub, deleted the local files, and dumped the content of that zip in place of the old directory. I thought this would be a seamless transition, but now GitHub Desktop is not recognizing these files as a git repository. I don't know why because there are github-specific files in there. I have made significant changes that I need to save. How do I reconnect this repository? Do I want to hit "Clone Again" or will that overwrite what I have locally with what is in the cloud? Again, I want to push what I have locally to the cloud.
For anybody else having this problem, here is what I did:
Save your local repository into a zip file someplace accessible,
like your desktop.
Completely gut your local directory--delete all
contents within the root folder. GitHub Desktop demands a clear folder to clone into.
In GitHub Desktop, where it says it
can't find your repository anymore, click the button that says
"Clone Again". This will download your cloud repository into your
local directory--the opposite of what we wanted, but at least what
comes next will work.
Delete all the cloned files that are NOT files associated with GitHub. This will prevent extraneous files from being left over when you overwrite your project files.
Copy all the non-GitHub-related files from the zip into the renewed directory.
This will restore the link between directories. Now, IT IS POSSIBLE that I deleted an essential GitHub file and did not notice (since there are at least 4 of them), and simply restoring THAT file from the cloud would fix everything. If you become disconnected like I was, I recommend trying that first in case it works and saves you time. Those are the files that get overwritten by GitHub when local files are updated.

stop git from tracking a file without removing the file from other developers machine

I have a file name settings.py. In my host machine settings.py has a different configuration with that of other developers. I want to stop git from tracking settings.py but not to delete this file from other developers machine when ever they pull changes in the project
Some people talk about including the file in .git/info/exclude folder.
But i have no idea as where to locate this file. I searched for it in my project folder( where git has been initialize). To no avail.
expected result
When ever i commit changes, all changes are push to master except my settings.py file, but not deleting this file from other developers machine when ever they pull my changes.
You already mentioned the correct answer. You can use .git/info/exclude as also documented here.
If you have not created this file yet, you can do so now. Simply place a text file called exclude in .git/info. The .git folder should be present already in the root of your repository.
The file uses the same syntax as a regular .gitignore file, but will only be applied to you.
You can also manually specify a core.excludesfile as described in this answer:
git config --global core.excludesfile ~/.gitignore

Moved project files into sub-directory, github still looks at upper level folder

I moved all of my project files from
x/project/files
to
x/project/sub-project/files
Github still uploads x/project/sub-project/files. How do I make upload sub-project/files instead?
I'm using pycharm if that helps at all
Edit 1:
I moved them using windows file explorer. I did commit before pushing
Edit 2: Solved by making a new GitHub repository.
Fixed By making a new GitHub repository