JGIt not cloning files apart form ones created in UI - jgit

i have pushed files using Push Command from local repository. the commit was successful and i could see the commit list in https://github.com/ . When i try to clone the same repository again, in my local folder i do not find all files cloned. the files that i pushed through my local folder is not seen. If i create a file directly in https://github.com/ only those are cloned.
Can anyone please help me with this issue as i dint find any materials related to this online. Thanks in advance!!!

Related

add r scripts to R project and connect to Github

I am new to using Rproject and Github. I have created some .R files .stan and .Rdata files in Rstudio.
I would like know a way how I can connect these files to a Github repository (which I have not created yet) so that I can collaborate them with others.
Reading through https://happygitwithr.com/rstudio-git-github.html , it appears that an Rproject is required to do this.
how do I add the existing .R, .stan and .RData files to a new Rproject?
Thanks
Since you are new. I recommend you install GitHub Desktop and read this if you are unfamiliar with it. log in using your GitHub credentials. Then go to File>New Repository and add your folder as a repository (you don't really need to have it as an Rproject although it is a good idea). You can simply commit everything with a message and then use "Push origin" to push it to GitHub.
Hope it helps.

Work by team with git on localhost

I am a beginner to this topic and I start developing a part of the special theme on wamp (localhost) and another teammate work on the remaining part.In this regard, think that I should use Git but I do not know what folders (wamp and wp and theme and plugin) put in the repository and which client of git is more suitable for us (all of us do not have much knowledge and little time to do it). please guide me.
anything that needs installation keep it outside of git.
any file which is specific to your machine and local settings , keep t in .gitignore
all the files and folders that are required to setup the project in any new machine + any files that would be changed by your teammates , include in the git.
ideally, the git init should be done in the project root. ou can make a branch for every theme and merge later when finished.
I'd initialize GIT in the root directory of the template itself since you only make changes in that specific folder.
In this case, each template/theme can be considered as one single GIT repository.
Hope this answers your question.

R Studio - Cloning local repository

I want to create a master repository on our server, from which I can clone a local version onto my computer.
I am using R Studio v0.98.994.
So far, this is what I have tried doing:
Create a folder for the master repository to live in. I do this using 'new project' in R studio, and tell it to make a git repository.
I can then open up another new project, located on my C drive, and use R studio to clone, by telling it to open an existing project and setting the URL as the location of the master project.
However, then when I make changes and commit to my local repository (which works fine) I cannot push to the master repository, I get an error exactly as described in this question: git push fails: `refusing to update checked out branch: refs/heads/master`
So it appears that R Studio creates non-bare repositories?
Now I thought, well okay, I will use git bash to initialise the repository and then connect to that within R studio.
I do so, but cannot then find a way to use that repository in R Studio.
I am very new to Git, so it is entirely probable that this is one of those 'read the instructions' questions, in which case I am very sorry - and could someone possibly point me towards some guidance for this situation? I have spent the better half of a day googling around this error and haven't yet managed to pull together the pieces :( I also apologise; this doesn't feel like a very reproducible question.
It sounds like you are using Windows Git, with a setup on a local Windows machine (C: drive) and a server of some kind, mounted as the S: drive. There's a few things you should be aware of when doing this.
Shared Repositories
If you are intending for multiple people to share the same repository, you want to initiate a shared repository. See the --shared option in git-init for more details. Note that I'm not sure how having your repository on a Windows machine affects the sharing options. If you are just trying to keep your repository in two places, that makes things a lot easier.
Bare Repositories
Separate from the discussion of sharing is the discussion of bare repositories. If you don't intend to ever work with files in the server (i.e. it's just going to be a place to push changes so they are safely stored), you could initialize a bare repository. A bare repository contains the database structure of Git, but does not have the actual files in the directory.
A standard Git repository is a directory with a hidden folder in it named .git. This .git folder contains all the various data structures that Git uses to track changes. A bare repository is essentially a folder containing only the contents of .git.
The good thing about a bare repository is that no one can work in the repository itself (since there is no working directory, just the database). This means that no one could log into S: and edit the repository themselves. Instead, they would have to clone the repository, then push their changes back to the origin. The GitGuys have a good article about why this is ideal.
Note that shared repos and bare repos are not dependent or mutually exclusive. As a general practice, if you are having a "server repo" from which you pull and to which you push, you should have it be bare, regardless of whether the project is shared.
A Non-Shared Workflow
Since it's not clear if you are sharing or not sharing and you're on a Windows environment, which I don't know about from a sharing standpoint, I'm going to give you a simple example. Using git-bash, you should be able to change directories to wherever on S: you have your repositories. Then, use git init with the bare options as described by the link above to initialize a bare repository. Navigate to where you want your repository to live on C:, and then do git clone to get a working copy.
Add a README file or something else so you can do your initial commit, and then commit and do git push origin master to push your changes to the S: repository. Once all that is done, THEN initialize the RStudio Git project. RStudio should defer to your existing configuration, and things should hopefully work.

Updating website with gitolite. Where is repo located on server?

My Wordpress files are currently in a gitolite repo on my server. I want to take it live by symlinking the repo to /var/www. This way I could keep editing and push updates. But I don't know where to find the actual files.
I'd expect them to be in ~git/repositories/project.git, but looking around, I don't see them. Is there a way to do what I'm thinking?
Thanks
In Git, there are two different kinds of repositories: repositories that consist of a working copy and a folder called .git inside that contains Git's files, and bare repositories that don't have a working copy and are just the bare .git folder. You can only push to bare repositories, so server software such as gitolite is using these. You can tell by looking at a repository's name: by convention, the name of bare repositoriy ends with .git.
I want to take it live by symlinking the repo to /var/www. This way I could keep editing and push updates. But I don't know where to find the actual files.
The reason is they aren't there. There are several ways to achieve what you are trying to do; probably the most easy way is to use a post-receive hook on your server-side repository.

how to recreate .meteor directory at another developer place?

I am starting out on a project that I want to work with my friend in GitHub, so I created the meteor project locally and then added it to github. It added everything except .meteor directory. When my colleague cloned and got the project down since it is missing .meteor directory, he is unable to start working on it. How do we go about recreating .meteor file at another location or am I suppose to include .meteor file into github as well?
* Edit: Since it is brand new project, I asked him to recreate the project locally and copy .meteor directory from the newly created one and copy it to git file location and it worked. Now sure it is the right way though.
You should always check in your .meteor directory because it contains critical information like which meteor version to use and the required packages for the project.
I suspect you may have avoided doing so because of the huge database stored within that directory. Fear not - each meteor project comes with a .meteor/.gitignore which will avoid checking in your DB.

Resources