FAQ

IndexTagsArchivesAbout
  • How to fully delete a git repository created with init?

    2022-11-17

    Question I created a git repository with git init. I'd like to delete it entirely and init a new one. Answer Git keeps all of its files in the .git directory. Just remove that one and init again. If you can't find it, it's because it is hidden. In Windows 7, you need to go to your folder, click on Organize on the top left, then click on Folder and search options, then click on the View tab and click on the Show hidden files, folders and drives radio button.…

    #git

  • I ran into a merge conflict. How do I abort the merge?

    2022-11-16

    Question I used git pull and had a merge conflict: unmerged: some_file.txt You are in the middle of a conflicted merge. How do I abandon my changes to the file and keep only the pulled changes? Answer Since your pull was unsuccessful then HEAD (not HEAD^) is the last "valid" commit on your branch: git reset --hard HEAD The other piece you want is to let their changes over-ride your changes.…

    #git

  • How do I programmatically determine if there are uncommitted changes?

    2022-11-15

    Question In a Makefile, I'd like to perform certain actions if there are uncommitted changes (either in the working tree or the index). What's the cleanest and most efficient way to do that? A command that exits with a return value of zero in one case and non-zero in the other would suit my purposes. I can run git status and pipe the output through grep, but I feel like there must be a better way.…

    #git

  • How to push different local Git branches to Heroku/master

    2022-11-15

    Question Heroku has a policy of ignoring all branches but 'master'. While I'm sure Heroku's designers have excellent reasons for this policy (I'm guessing for storage and performance optimization), the consequence to me as a developer is that whatever local topic branch I may be working on, I would like an easy way to switch Heroku's master to that local topic branch and do a "git push heroku -f" to over-write master on Heroku.…

    #git

  • How to un-commit last un-pushed git commit without losing the changes

    2022-11-14

    Question Is there a way to revert a commit so that my local copy keeps the changes made in that commit, but they become non-committed changes in my working copy? Rolling back a commit takes you to the previous commit - I want to keep the changes made but I committed them to the wrong branch. This has not been pushed, only committed. Answer There are a lot of ways to do so, for example:…

    #git

  • Python Pandas Error tokenizing data

    2022-11-14

    Question I'm trying to use pandas to manipulate a .csv file but I get this error: pandas.parser.CParserError: Error tokenizing data. C error: Expected 2 fields in line 3, saw 12 I have tried to read the pandas docs, but found nothing. My code is simple: path = 'GOOG Key Ratios.csv' #print(open(path).read()) data = pd.read_csv(path) How can I resolve this? Should I use the csv module or another language ? File is from Morningstar…

    #python

  • How do I revert a Git repository to a previous commit?

    2022-11-13

    Question This question's answers are a community effort. Edit existing answers to improve this post. It is not currently accepting new answers or interactions. </div> How do I revert from my current state to a snapshot made on a certain commit? If I do git log, then I get the following output: $ git log commit a867b4af366350be2e7c21b8de9cc6504678a61b` Author: Me <me@me.com> Date: Thu Nov 4 18:59:41 2010 -0400 blah blah blah……

    #git

  • «
  • 66
  • 67
  • 68
  • 69
  • 70
  • »

©2023 hugo-notepadium-mod

CC BY-NC-SA 4.0 | RSS

Powered by Hugo and the Notepadium-mod

^ TOP ^