I use git for version control. One of the biggest conveniences for me is running “git pull” to download the latest commits. But sometimes, the git pull fails because of a file that changed on the server. That’s usually my fault.
$ git pull
* [new branch] master -> origin/master
error: Your local changes to the following files would be overwritten by merge:
Please, commit your changes or stash them before you can merge.
So here’s how to go about pulling from git anyways: From the directory you are trying to “git pull”
Your shell will read “Fetching origin” Then execute the git reset command:
git reset --hard origin/master
You will see something similar to this output: HEAD is now at 76637bf fix truncate…
I was using acd_cli, mounted to my file system last night, and picked up today to finish up. I navigated to the directory I mount ACD in and listed the contents.
root@vultr:/var/cloud# ls -alF
ls: cannot open directory '.': Bad address
Only to see an error that I haven’t seen yet (in my experience with ACD_CLI.) I thought maybe the mount went bad. It was throwing an error when I tried to mount the file system again:
16-12-28 18:01:26.195 [WARNING] [acdcli.cache.db] - Sqlite database integrity check failed.
You may need to clear the cache if you encounter any errors.
Traceback (most recent call last):
File "/usr/local/bin/acdcli", line 9, in <module>
load_entry_point('acdcli==0.3.2', 'console_scripts', 'acdcli')()
File "/usr/local/bin/acd_cli.py", line 1652, in main
cache = db.NodeCache(CACHE_PATH, SETTINGS_PATH, args.check)
File "/usr/local/lib/python3.5/dist-packages/acdcli/cache/db.py", line 65, in __init__
sqlite3.DatabaseError: database disk image is malformed
root@vultr:~# sqlite3.DatabaseError: database disk image is malformed
sqlite3.DatabaseError:: command not found
Since the local cache could be corrupt, let’s go ahead and clear it: Your cache directory should be .cache in your…
I find myself stuck in situations where I can’t really leave or close my shell session, but I have to go somewhere else, disconnect my internet, or otherwise lose shell access for some reason or another and unable to get back where I left off. Things like this happen sometimes, right? Or is it just me? The solution for this is screen Overview of Screen: Screen is a full-screen window manager that multiplexes a physical terminal between several processes, typically interactive shells. Each virtual terminal provides the functions of the DEC…