Visual Studio Code is always asking for Git credentials
2023-02-21
Question I started using Visual Studio Code, and I was trying to save my test project into GitHub, but Visual Studio Code is always asking for my GitHub credentials. I have installed in my PC GitHub Desktop and also Git. I already ran: git config --global credential.helper wincred but still Visual Studio Code is asking for the credentials. How can I fix this? Here is my .gitconfig file located in the user profile folfer:…
Can I make 'git diff' only display the line numbers AND changed file names?
2023-02-20
Question This question calls for "line numbers". If you do not care about line numbers in the output, see this question and answer. Basically, I don't want to see the changed content, just the file names and line numbers. Answer You can use this command to see the changed file names, but not with line numbers: git diff --name-only Go forth and diff!
How to find/identify large commits in git history?
2023-02-20
Question I have a 300 MB git repo. The total size of my currently checked-out files is 2 MB, and the total size of the rest of the git repo is 298 MB. This is basically a code-only repo that should not be more than a few MB. I suspect someone accidentally committed some large files (video, images, etc), and then removed them... but not from git, so the history still contains useless large files.…
How to avoid pandas creating an index in a saved csv
2023-02-19
Question I am trying to save a csv to a folder after making some edits to the file. Every time I use pd.to_csv('C:/Path of file.csv') the csv file has a separate column of indexes. I want to avoid printing the index to csv. I tried: pd.read_csv('C:/Path to file to edit.csv', index_col = False) And to save the file... pd.to_csv('C:/Path to save edited file.csv', index_col = False) However, I still got the unwanted index column.…
Rollback a Git merge
2023-02-18
Question develop branch --> dashboard (working branch) I use git merge --no-ff develop to merge any upstream changes into dashboard git log: commit 88113a64a21bf8a51409ee2a1321442fd08db705 Merge: 981bc20 888a557 Author: XXXX <> Date: Mon Jul 30 08:16:46 2012 -0500 Merge branch 'develop' into dashboard commit 888a5572428a372f15a52106b8d74ff910493f01 Author: root <root@magneto.giveforward.com> Date: Sun Jul 29 10:49:21 2012 -0500 fixed end date edit display to have leading 0 commit 167ad941726c876349bfa445873bdcd475eb8cd8 Author: XXXX <> Date: Sun Jul 29 09:13:24 2012 -0500 The merge had about 50+ commits in it, and I am wondering how to just revert the merge so dashboard goes back to the state pre-merge…
Restore file from old commit in git
2023-02-17
Question I have an old commit that I did a few weeks ago. I want to restore only a single file from that commit. What do I do? Answer git checkout 'master@{7 days ago}' -- path/to/file.txt This will not alter HEAD, it will just overwrite the local file path/to/file.txt See man git-rev-parse for possible revision specifications there (of course a simple hash (like dd9bacb) will do nicely) Don't forget to commit the change (after a review.…
Repository access denied. access via a deployment key is read-only
2023-02-16
Question After successfully cloning my repo from heroku and added another remote 1/ git clone git@heroku.com:[APP].git 2/ git remote add bitbucket ssh://git@bitbucket.org/[ACCOUNT]/[REPO].git 3/ git push bitbucket master I am still getting this error after running line (3) or using SourceTree conq: repository access denied. access via a deployment key is read-only. First I don't understand what this message means in practice. And that's shame. I did create ssh key pair and added to heroku :…