Tag: linux

Commit file property changes to git repository

I have bunch of file with incorrect permissions: since the files may contain passwords I don’t want them to be world-readable after checkout so that the user does not have to remember changing acces rights. -rw—-rw-. 1 beginner beginner 16 19. Sep 04:36 file1.config -rw—-rw-. 1 beginner beginner 16 19. Sep 04:36 file2.config -rw—-rw-. 1 […]

SmartGit (git) ghost modifications

I currently use smartgit for a personal project. I have text (.txt) + code (C++) in my repo. Each time I modify my text files and commit them, “ghost” changes automatically appear in my .h and .cpp files. SmartGit shows modifications but when I check I compare the versions SmartGit says the content of the […]

Redis has no dump.rdb only a temp.rdb?

I think I may have messed something up with my redis config. Using nodeBB I am trying to share my .rdb file with git because I want to share the data in my local env and on my server. In the process of looking for the .rdb file I do redis-cli then CONFIG GET * […]

How to fix GIT error : HEAD: invalid reflog entry xxxxxxxxxxxxxxxx

I have met an error before(GIT error: object file is empty) error_object_file_is_empty Then I used the method mentioned in how to fix GIT error: object file is empty? After I updated the HEAD pointer to a good object, it does work .but when I restart the machine ,the same error(object file is empty) occured. I […]

Git: Working with executables

I have a project in which there is a .sh file and it has to be in the executable mode once pulled by the others. Now, I already changed its permissions on my local machine. However I want it to be pushed/pulled as executable as well, so that the other users do not have to […]

Kali linux “could not resolve host github.com” error

I am attempting to download Discover Scripts and have been using git clone https://github.com/leebaird/discover.git as my command. Upon running, it returned: git clone https://github.com/leebaird/discover.git Cloning into ‘discover’… remote: Counting objects: 4217, done. remote: Compressing objects: 100% (34/34), done. error: RPC failed; result=56, HTTP code = 200 | 445.00 KiB/s fatal: The remote end hung up […]

Get output of FOR with EOF in bash

I’ve created a bash script to temporarily help me send some files to a FTP server based on the id of the commit, i get the last commit, track the files and send as listed below. #!/bin/bash commit_hash=$(git log –format=”%H” -n 1) [[ -z “$1” ]] || commit_hash=$1 files=$(git diff-tree –no-commit-id –name-only -r $commit_hash) echo […]

How do I restart a python script running inside of a screen using a bash script?

Okay here’s my situation: On a server I have a screen session (which was initiated using screen -S python-script) running a python script inside of it. I make changes to this project by pushing to a git repo. When I want to have the changes reflected on the project, I ssh into the server, screen […]

Using git to store repository in /opt/ for all users?

I have several users on the same linux machine to which several people remote to, and we have a software project we are working on. How do I keep main repository in /opt (e.g. /opt/GitRepo/project).. and let everyone else have a brand in their local /home/user directory? I have tried to clone the directory, but […]

Trying to install GitLab on Apache on CentOS 7

I’m trying to install GitLab, but I want to install it on an Apache web server on my VPS. I know that GitLab was built for nginx, but I honestly don’t want to use it. I was wondering how I would be able to have a setup so that mysite.com would retrieve the files (like […]

Git Baby is a git and github fan, let's start git clone.