开发者

Google App Engine and Git best practices

开发者 https://www.devze.com 2023-01-01 00:45 出处:网络
I\'m developing a small pet project on Google App Engine and I would like to keep the source code under source control using github; this will allow a friend of mine to checkout and modify the sources

I'm developing a small pet project on Google App Engine and I would like to keep the source code under source control using github; this will allow a friend of mine to checkout and modify the sources.

I just have a PetProject directory with all the sources and the Google App Engine development server pointing to that directory.

Is it correct to create a repo directly from PetProject开发者_开发知识库 directory or is it preferable to create a second directory mirroring the develop PetProject directory?

In the latter case, anytime my friend will release something new, I would need to pull fetch from Git copying the modified files to the develop PetProject directory.

If I decide to keep the repo inside the develop directory, skipping .git on Gae yaml is enough?

What are the best practices here?


You can create a git repo directly within your current PetProject directory.

One trick would be to clone your new (and empty) GitHub repo in a local directory, and then copy the .git subdirectory in your PetProject directory.
That way, you have a Git repo already connected to a remote GitHub upstream repo.

Modify your .gitignore file to exclude what you dont 'want to publish. git add -A and then git commit -m "first commit" And then push to your GitHub repo.

Note: instead of pulling from your git repo (which means merging immediately whatever has been pushed on the same branch), you might want to fetch first, and then check what you could merge.


As Nick Johnson comments though, GitHub has a clear process to setup a remote.

 git remote add github git@github.com:git_username/projectname.git
0

精彩评论

暂无评论...
验证码 换一张
取 消