Rectangle 27 62

$HOME/.gitconfig
cat $(git rev-parse --show-toplevel)/.git/config

(mentioned by bereal) is your local config, local to the repo you have cloned.

you can also type from within your repo:

And see if there is any remote named 'origin' listed in it.

If not, if that remote (which is created by default when cloning a repo) is missing, you can add it again:

git remote add origin url/to/your/fork
upstream git://git.moodle.org/moodle.git (fetch) 
upstream git://git.moodle.org/moodle.git (push)
origin
git remote -v
upstream	git://git.moodle.org/moodle.git (push)

@xan 'upstream" is the repo you have forked. You are missing origin, which is your fork on github. See stackoverflow.com/a/15632224/6309 and stackoverflow.com/a/9257901/6309

github - fatal: 'origin' does not appear to be a git repository - Stac...

git github push git-push
Rectangle 27 62

$HOME/.gitconfig
cat $(git rev-parse --show-toplevel)/.git/config

(mentioned by bereal) is your local config, local to the repo you have cloned.

you can also type from within your repo:

And see if there is any remote named 'origin' listed in it.

If not, if that remote (which is created by default when cloning a repo) is missing, you can add it again:

git remote add origin url/to/your/fork
upstream git://git.moodle.org/moodle.git (fetch) 
upstream git://git.moodle.org/moodle.git (push)
origin
git remote -v
upstream	git://git.moodle.org/moodle.git (push)

@xan 'upstream" is the repo you have forked. You are missing origin, which is your fork on github. See stackoverflow.com/a/15632224/6309 and stackoverflow.com/a/9257901/6309

github - fatal: 'origin' does not appear to be a git repository - Stac...

git github push git-push
Rectangle 27 6

I faced the same problem when I renamed my repository on GitHub. I tried to push at which point I got the error

fatal: 'origin' does not appear to be a git repository
fatal: The remote end hung up unexpectedly
git remote set-url origin ssh://git@github.com/username/newRepoName.git

After this all commands started working fine. You can check the change by using

git remote -v
[aniket@alok Android]$ git remote -v
origin  ssh://git@github.com/aniket91/TicTacToe.git (fetch)
origin  ssh://git@github.com/aniket91/TicTacToe.git (push)

github - fatal: 'origin' does not appear to be a git repository - Stac...

git github push git-push
Rectangle 27 6

I faced the same problem when I renamed my repository on GitHub. I tried to push at which point I got the error

fatal: 'origin' does not appear to be a git repository
fatal: The remote end hung up unexpectedly
git remote set-url origin ssh://git@github.com/username/newRepoName.git

After this all commands started working fine. You can check the change by using

git remote -v
[aniket@alok Android]$ git remote -v
origin  ssh://git@github.com/aniket91/TicTacToe.git (fetch)
origin  ssh://git@github.com/aniket91/TicTacToe.git (push)

github - fatal: 'origin' does not appear to be a git repository - Stac...

git github push git-push
Rectangle 27 25

To remove folder/directory only from git repository and not from the l...

git rm -r --cached FolderName
git commit -m "Removed folder from repository"
git push origin master

Steps to ignore that folder in next commits

To ignore that folder from next commits make one file in root named .gitignore and put that folders name into it. You can put as many as you want

/FolderName

Well done... this was what I was looking for. :) Thanks!

This is THE answer. (Works as of July 2016)

Good man, worked a charm.

git - Remove directory from remote repository after adding them to .gi...

git github gitignore
Rectangle 27 21

To remove folder/directory only from git repository and not from the l...

git rm -r --cached FolderName
git commit -m "Removed folder from repository"
git push origin master

Steps to ignore that folder in next commits

To ignore that folder from next commits make one file in root named .gitignore and put that folders name into it. You can put as many as you want

/FolderName

Well done... this was what I was looking for. :) Thanks!

This is THE answer. (Works as of July 2016)

Good man, worked a charm.

git - Remove directory from remote repository after adding them to .gi...

git github gitignore
Rectangle 27 21

To remove folder/directory only from git repository and not from the l...

git rm -r --cached FolderName
git commit -m "Removed folder from repository"
git push origin master

Steps to ignore that folder in next commits

To ignore that folder from next commits make one file in root named .gitignore and put that folders name into it. You can put as many as you want

/FolderName

Well done... this was what I was looking for. :) Thanks!

This is THE answer. (Works as of July 2016)

Good man, worked a charm.

git - Remove directory from remote repository after adding them to .gi...

git github gitignore
Rectangle 27 21

To remove folder/directory only from git repository and not from the l...

git rm -r --cached FolderName
git commit -m "Removed folder from repository"
git push origin master

Steps to ignore that folder in next commits

To ignore that folder from next commits make one file in root named .gitignore and put that folders name into it. You can put as many as you want

/FolderName

Well done... this was what I was looking for. :) Thanks!

This is THE answer. (Works as of July 2016)

Good man, worked a charm.

git - Remove directory from remote repository after adding them to .gi...

git github gitignore
Rectangle 27 143

git pull is really equivalent to running git fetch and then git merge. The git fetch updates your so-called "remote-tracking branches" - typically these are ones that look like origin/master, github/experiment, etc. that you see with git branch -r. These are like a cache of the state of branches in the remote repository that are updated when you do git fetch (or a successful git push).

So, suppose you've got a remote called origin that refers to your GitHub repository, you would do:

git fetch origin
git diff master origin/master

... in order to see the difference between your master, and the one on GitHub. If you're happy with those differences, you can merge them in with git merge origin/master, assuming master is your current branch.

Personally, I think that doing git fetch and git merge separately is generally a good idea.

if you have setup remote tracking then the commands get a little simpler: 'git fetch' to fetch, 'git diff ..@{u}' to see the differences. I can never keep origin, master, and origin/master straight, so the short commands help a lot

git - How to check the differences between local and github before the...

git github
Rectangle 27 27

If I understand you correctly you want to rename your git repository eg xyz.git to xyz1.git and then have all the git repositories that link to that repo link to the new name automatically?

As far as I know this isn't possible. Each repository is self contained and keeps a list of locations it links to. If one of those locations changes its name the link would be broken. Each repository that references the changed name would need to update its link.

But then, the same would happen if you deleted a repository and recreated it under a new name....

Just realised you were specifically talking about GitHub and not git in general, sorry - should learn to read the entire question like my school teachers said. The answer still stands, with the addition that you can change the name in GitHub from the Admin page.

Renaming via the "admin" page... omg. Thanks a lot! Btw: The mentioned links are from outside spread around blogs, forums, SE, etc.

Nice. Just used this info to rename a repo from the github admin page of my repo. The cool thing is that GitHub for Windows automatically updated my local repo with the new name. Didn't even have to refresh.

how to rename a repository on github? - Stack Overflow

github
Rectangle 27 3

GitHub is a website where you can upload a copy of your Git repository. It is a Git repository hosting service, which offers all of the distributed revision control and source code management (SCM) functionality of Git as well as adding its own features.

Unlike Git, which is strictly a command-line tool, GitHub provides a web-based graphical interface and desktop as well as mobile integration. It also provides access control and several collaboration features such as wikis, task management, bug tracking and other features that can be helpful for projects. It allows you to collaborate with other people on a project. It does that by providing a centralized location to share the repository, a web-based interface to view it, and features like forking, pull requests distributed revision control, issues, and wikis.

what kind of job is done by github task management system ?

Difference between Git and GitHub - Stack Overflow

git github
Rectangle 27 45

Following method is a generic way of pushing an Android Studio project to a GIT based repository solely using GUI.This has been tested with a GIT repository hosted in Visual Studio Online and should virtually work with GitHub or any other GIT based version control provider.

Enable the GIT Integration plugin

Open the Version Control windows (Next to terminal window) >> Click commit button

In the prompt window select "commit and push"

After analyzing code android studio will prompt to review or commit code when committed will be prompt to define the remote repository.There you can add the url to GIT repository.

Then enter the credentials for the repository and click 'Ok'.(Visual Studio online Users need to enable "alternate authentication credentials" as mentioned here to login to repository)

How do you synchronise projects to GitHub with Android Studio? - Stack...

android github intellij-idea android-studio
Rectangle 27 42

Following method is a generic way of pushing an Android Studio project to a GIT based repository solely using GUI.This has been tested with a GIT repository hosted in Visual Studio Online and should virtually work with GitHub or any other GIT based version control provider.

Enable the GIT Integration plugin

Open the Version Control windows (Next to terminal window) >> Click commit button

In the prompt window select "commit and push"

After analyzing code android studio will prompt to review or commit code when committed will be prompt to define the remote repository.There you can add the url to GIT repository.

Then enter the credentials for the repository and click 'Ok'.(Visual Studio online Users need to enable "alternate authentication credentials" as mentioned here to login to repository)

How do you synchronise projects to GitHub with Android Studio? - Stack...

android github intellij-idea android-studio
Rectangle 27 9

Okay, I think I've recreated your situation locally and it appears that RubyMine has terrible support for managing remotes. If you create a Git repository locally, then (separately) create a repository on GitHub, there's no obvious way to marry the two from within RubyMine.

Basically, you need to set up GitHub as a remote for your local repository from the shell, and once that's done then RubyMine will be able to push as normal.

Please note that the below instructions assume you want to overwrite your GitHub repository with the full history from your local repository -- If your GitHub repository has data that you do not want to lose, do not execute these commands! See Below.

cd /path/to/my/project/root
git remote add origin https://github.com/yourusername/yourrepo.git
git push -u origin +master
VCS > Git > Push

If your GitHub repository has already been committed to and you don't want to lose those changes, you'll need to either create a new GitHub repo or clone your GitHub repo into another folder and merge your local repository into the clone.

This can be avoided entirely if you're trying to push your existing local repository to a new GitHub repo: Simply use the VCS > Import into Version Control > Share project on GitHub option and use the dialog to create a new GitHub repository.

I forget to add that what you suggested above worked, although I did try that same syntax myself, with no success a couple of days ago. Perhaps I was still missing something. This is of course done outside RubyMine. I posted something that I think is a big in RubyMine on their dev discussion forum, a few hours ago, but so far I have not heard back.

Rails: Rubymine: GitHub - Stack Overflow

ruby-on-rails rubymine
Rectangle 27 4

If you already have a git repository in place, first copy all your files to that directory (yes, manually) and do a git commit -a to commit all the files into the repository. I'm assuming here that you've already initialized the repository at C:\Users\username\GitHub\project_name\ with git init.

In eclipse, go to File Switch Workspace Other... and point it to a workspace of your choice that can be completely different than the location of your code, or your earlier workspace. In fact, don't point it to the directory which contains your git repository.

Once you have a clean workspace, go to File New Other..., select Git Git Repository and enter the path of your git repository (C:\Users\username\GitHub\project_name\). Enter a name for the repository, and click Finish.

I would really recommend you read at least the first few chapters of the git book to understand how git works, and to help you push and pull code to and from remote repositories.

If your existing repository is not git, you're going to have a hard time keeping the directories in sync. You might want to setup rsync to sync the directories. There is no way AFAIK for eclipse to automagically keep the two repositories in sync.

How do I configure Eclipse to use an existing git repository with exis...

eclipse git github
Rectangle 27 4

If you already have a git repository in place, first copy all your files to that directory (yes, manually) and do a git commit -a to commit all the files into the repository. I'm assuming here that you've already initialized the repository at C:\Users\username\GitHub\project_name\ with git init.

In eclipse, go to File Switch Workspace Other... and point it to a workspace of your choice that can be completely different than the location of your code, or your earlier workspace. In fact, don't point it to the directory which contains your git repository.

Once you have a clean workspace, go to File New Other..., select Git Git Repository and enter the path of your git repository (C:\Users\username\GitHub\project_name\). Enter a name for the repository, and click Finish.

I would really recommend you read at least the first few chapters of the git book to understand how git works, and to help you push and pull code to and from remote repositories.

If your existing repository is not git, you're going to have a hard time keeping the directories in sync. You might want to setup rsync to sync the directories. There is no way AFAIK for eclipse to automagically keep the two repositories in sync.

How do I configure Eclipse to use an existing git repository with exis...

eclipse git github
Rectangle 27 4

If you already have a git repository in place, first copy all your files to that directory (yes, manually) and do a git commit -a to commit all the files into the repository. I'm assuming here that you've already initialized the repository at C:\Users\username\GitHub\project_name\ with git init.

In eclipse, go to File Switch Workspace Other... and point it to a workspace of your choice that can be completely different than the location of your code, or your earlier workspace. In fact, don't point it to the directory which contains your git repository.

Once you have a clean workspace, go to File New Other..., select Git Git Repository and enter the path of your git repository (C:\Users\username\GitHub\project_name\). Enter a name for the repository, and click Finish.

I would really recommend you read at least the first few chapters of the git book to understand how git works, and to help you push and pull code to and from remote repositories.

If your existing repository is not git, you're going to have a hard time keeping the directories in sync. You might want to setup rsync to sync the directories. There is no way AFAIK for eclipse to automagically keep the two repositories in sync.

How do I configure Eclipse to use an existing git repository with exis...

eclipse git github
Rectangle 27 4

If you already have a git repository in place, first copy all your files to that directory (yes, manually) and do a git commit -a to commit all the files into the repository. I'm assuming here that you've already initialized the repository at C:\Users\username\GitHub\project_name\ with git init.

In eclipse, go to File Switch Workspace Other... and point it to a workspace of your choice that can be completely different than the location of your code, or your earlier workspace. In fact, don't point it to the directory which contains your git repository.

Once you have a clean workspace, go to File New Other..., select Git Git Repository and enter the path of your git repository (C:\Users\username\GitHub\project_name\). Enter a name for the repository, and click Finish.

I would really recommend you read at least the first few chapters of the git book to understand how git works, and to help you push and pull code to and from remote repositories.

If your existing repository is not git, you're going to have a hard time keeping the directories in sync. You might want to setup rsync to sync the directories. There is no way AFAIK for eclipse to automagically keep the two repositories in sync.

How do I configure Eclipse to use an existing git repository with exis...

eclipse git github
Rectangle 27 4

For the sake of others having this issue - I landed here because I tried to get cute with how I set up a new github repository, but per the setup page credential helper doesn't work unless you clone a repository.

"Tip: The credential helper only works when you clone an HTTPS repository URL. If you use the SSH repository URL instead, SSH keys are used for authentication. This guide offers help generating and using an SSH key pair."

msysgit - git: 'credential-cache' is not a git command - Stack Overflo...

git msysgit git-bash git-config
Rectangle 27 4

For the sake of others having this issue - I landed here because I tried to get cute with how I set up a new github repository, but per the setup page credential helper doesn't work unless you clone a repository.

"Tip: The credential helper only works when you clone an HTTPS repository URL. If you use the SSH repository URL instead, SSH keys are used for authentication. This guide offers help generating and using an SSH key pair."

msysgit - git: 'credential-cache' is not a git command - Stack Overflo...

git msysgit git-bash git-config