Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9195813
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T21:42:42+00:00 2026-06-17T21:42:42+00:00

I followed this guide and Step 4 says to do some stuff with .bash_profile

  • 0

I followed this guide and Step 4 says to do some stuff with .bash_profile, add some work tree. I think this is what’s causing my problem, which I’ll explain further down.

# GIT  
export GIT_DIR=~/repo.git  
export GIT_WORK_TREE=~/www 

I’m not really good at Git, but I got through the guide and it actually sorta worked.

My problem now is, that I don’t want to use Git deployment directly from local -> server, but rather local -> github/bitbucket/etc -> server, because I need a visual of what I’m actually doing, and I found the guide mentioned way too advanced for what I actually needed.

Now I’m using this guide and have everything working out great, except when it comes to clone from github to my server, the end of step 3. If I try and clone the repo I’m met with:

fatal: working tree '/var/www/vhosts/soegaardcykler.dk/httpdocs' already exists.

I’ve deleted everything in .bash_profile, and tried going backwards on the first-mentioned guide to actually sort out every little bit of mess I might have caused.

If I try and create a new git repository in a new folder inside of

/var/www/vhosts/soegaardcykler.dk/httpdocs/

I’m met with:

fatal: Could not switch to '/var/www/vhosts/soegaardcykler.dk/sc-gh/': No such file or directory

Something somewhere thinks that the above path is the path to use.. And I have no idea where to undo this.

Is an uninstall of git my only option? And if so, how would I go about doing that?

Bonus info: I’m on a mediatemple (dv), using CentOS5 and logged in as /bin/bash on a domain-user when this problem occurs.

If I try navigativing to the soegaardcykler.dk-folder as root and make a new dir, or go into an old, I’m able to do a git init, which I can’t as /bin/bash domain-user..
Being in the same dir as root and /bin/bash domain-user doing “git status” on both gives the normal git message as root, initial commit etc. As domain user I’m met with

fatal: Not a git repository: '/var/www/vhosts/soegaardcykler.dk/sc-gh/'

(please note that the above dir doesn’t even exist! And it doesn’t matter if I’m trying to do it in a new dir initialized as git with root, or another dir that isn’t initialized with git.

I hope you understand my question. I’m very confused myself and having a hard time explaining my issue (hence my google searches suck as well). This is why a designer should never go about messing with backend developer-stuff.

At this point I wish I could reset everything with git on my server and start fresh!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T21:42:43+00:00Added an answer on June 17, 2026 at 9:42 pm

    At this point of confusion (I can’t understand what’s screwed up here) you must effectively start fresh.

    Don’t do stuff as root, to start with. Never.

    Uninstalling git won’t do anything better, except loss of time.

    In this case adopt good reflex when asking:

    • don’t issue error messages without the command you entered.
    • you say you’ve modified environment variables and you think it has screwed things; why don’t you check their value and post it in question? It’s just echo $GIT_DIR command.

    Try to clone your github repo in a classical way (without different locations for git-dir and working tree) and do things step by step. Come up here when you have questions.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I followed this guide: http://wiki.unto.net/setting-up-clojure-and-slime Which walked me through the steps of building Clojure
I followed every step given in this guide: http://help.github.com/linux-key-setup/ When I get to the
So I followed this guide here http://www.kodyaz.com/articles/sql-server-2005-database-encryption-step-by-step.aspx on how to setup encryption for my
I followed this step by step guide for installing Hibernate After selecting all the
So I have followed This guide and used a simple printing python file. Problem
I followed this guide which I was recommended , but I can't get it
I followed this guide here perfectly and have gone through it again but when
I have followed this guide: http://maven.apache.org/guides/plugin/guide-java-plugin-development.html I have created a maven-plugin project hello-maven-plugin with
I have followed this guide to install Solr in TomCat running on Windows Server
I have just followed this guide: http://rogueleaderr.tumblr.com/post/32768181371/set-up-and-run-a-fully-distributed-hadoop-hbase-cluster to get a cluster set up on

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.