Not able to push to GitHub - github

I am trying to push code to my private repo on github but I am getting the error in the screenshot.
I made a new branch and tried to push but for some reason it is not working.

As it says in the error - you are trying to push a 176MB file, which is greater than GitHub supports. I'd suggest putting it into your .gitignore or using Git LFS.

If you read the error message it states "This exceeds GitHub's file size limit of 100.00MB"
So you've to exclude that file from being pushed.
I would recommend this .gitignore file which will prevent this file and other files from being pushed.
In order to use the .gitignore file, create in the root directory of your repository (The same folder .git is in) a file called .gitignore paste the content of the site above in that file.

Related

How to recover files from .gitignore

while uploading files to the repository in GitHub, I accidentally click to the button to ignore the files from the upload. Now these files are in a folder called '.gitignore'.
How can I recover these files?
I'm able to see and modify them, I just want to know how to upload them in the repository.
Thanks in advance
I think you misunderstand the concept of .gitignore "folder".
It is instead a text file, with the path of the ignored directories or files.
Consider the following .gitignore file.
foo/bar.txt
foobar/
This will tell git to ignore the directory foobar as well as the file foo/bar.txt, and therefore you won't be able add the files to a commit or push it to a remote repository.
But you can simply remove a file from the list of ignored files and directories by opening the .gitignore file, deleting the line with the corresponding file and saving the .gitignore file. You then should the be able to add the file to a commit and push it to a remote repository.
More information about .gitignore can be found here

How to push empty folder to AzureDevops through visual studio

I tried few times and failed to push empty folder, any way to push empty folder to azdo from VS.
For this issue, in Git, you cannot commit empty folders, because Git does not actually save folders, only files. You'll have to create some placeholder file inside those directories if you actually have no committable content.
You can refer to this How can I add an empty directory to a Git repository? and this official document.
You can add .gitkeep file inside this directory.

Github Desktop not detecting db.sqlite

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.

what Git Ignore field means in github desktop while creating a new repository

see the Git Ignore option in the below image.What I have to choose, I am creating an ionic-framework repository.
https://i.stack.imgur.com/pBvkd.png
.gitignore is a file which, Git uses to determine which files and directories to ignore, before you make a commit. These files/directories will not be pushed into the repository.
If you have any files or directories that don't need to be pushed into the repository, then you can include them. (a simple example : log files)
If there is no ionic option, you can ignore it, and create it locally on your repo, then push it back to your GitHub repo.
To create it, see https://www.gitignore.io/api/ionic3
It does generate an Ionic .gitignore for you.

How to hide unmodified files while check in Github

I am using Github in our Project.
When I am checking in Github to pull data from original master it is displaying all the files but I need the files which are changed by me.
You can use git log to display updated files by author.
See for instance "Can I get git to tell me all the files one user has modified?"
git log --pretty="%H" --author="authorname"
(replace authorname by your own, as you specified it in git config user.name)
After a pull, you can log between master#{1} and master.