Files created not showing up in git #376

huffn opened this Issue May 18, 2012 · 2 comments


None yet
2 participants

huffn commented May 18, 2012

I've created a file in the /app folder, + "/test.txt", 'a', 0666, function(err, fd){
 fs.write(fd, query + "\n", null, undefined, function (err, written) {
 console.log('bytes written: ' + written);

But I can't seem to access that file when I pull the project in git. What am I supposed to do in order to see test.txt?


alejandro commented May 18, 2012

Since the path where your app lives can't access to the git repo (the original), you can't do git add; git commit. So, because the file is not inside the repo, you can't pull it back.

What you can do is to create a endpoint in your app's api to pull that file on request. Maybe something like:

// app logic code
if (req.url === '/test.txt'){
  var stream = fs.createReadStream('path/to/test.txt');
// continue

And there you go, you can have your test.txt file locally, if that's what you want.


alejandro commented Jul 12, 2012

RE: #313

alejandro closed this Jul 12, 2012

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment