OiO.lk Community platform!

Oio.lk is an excellent forum for developers, providing a wide range of resources, discussions, and support for those in the developer community. Join oio.lk today to connect with like-minded professionals, share insights, and stay updated on the latest trends and technologies in the development field.
  You need to log in or register to access the solved answers to this problem.
  • You have reached the maximum number of guest views allowed
  • Please register below to remove this limitation

Can I use a .gitignore with a bare repo?

  • Thread starter Thread starter cade galt
  • Start date Start date
C

cade galt

Guest
I have a bare repo that I setup using

Code:
git init --bare

It also has a simple post-receive hook like this that updates the web application.

Code:
git --work-tree=/foo/public_html --git-dir=/foo/root.git checkout -f

I want to also push to github but I did not want to push my entire repo.

Code:
git push github_repo

I wanted to use a .gitignore file in the root directory that ignores all my php files:

Code:
*.php

Can I do it this way?
<p>I have a bare repo that I setup using </p>

<pre><code>git init --bare
</code></pre>

<p>It also has a simple post-receive hook like this that updates the web application.</p>

<pre><code>git --work-tree=/foo/public_html --git-dir=/foo/root.git checkout -f
</code></pre>

<p>I want to also push to github but I did not want to push my entire repo.</p>

<pre><code>git push github_repo
</code></pre>

<p>I wanted to use a .gitignore file in the root directory that ignores all my php files:</p>

<pre><code>*.php
</code></pre>

<p>Can I do it this way?</p>
Continue reading...
 

Online statistics

Members online
0
Guests online
4
Total visitors
4
Top