git-remote

Git add a worktree from existing remote branch

瘦欲@ 提交于 2019-12-03 15:18:22
问题 I'm new to Git. I search a lot but nothing found that exactly matches my case. I have a personal WinForms application and in my remote repo there are 3 branches (master and 2 long running branches): master #the common features are here like Core, DAL,... north #customized for A company (long-running) razavi #customized for B company (long-running) At my office PC, I add 2 worktree for those north and razavi branches: $ git worktree list C:/Source/nis a6fb6e1 [master] C:/Source/north ebc7670

Git add a worktree from existing remote branch

主宰稳场 提交于 2019-12-03 10:18:49
I'm new to Git. I search a lot but nothing found that exactly matches my case. I have a personal WinForms application and in my remote repo there are 3 branches (master and 2 long running branches): master #the common features are here like Core, DAL,... north #customized for A company (long-running) razavi #customized for B company (long-running) At my office PC, I add 2 worktree for those north and razavi branches: $ git worktree list C:/Source/nis a6fb6e1 [master] C:/Source/north ebc7670 [north] C:/Source/razavi eed08a2 [razavi] Everything is OK so far, I decide to work on this project from

“src refspec does not match” and “failed to push some refs” errors on git push [duplicate]

旧城冷巷雨未停 提交于 2019-12-03 09:56:33
This question already has answers here : Error when “git push” to github (5 answers) Possible Duplicate: Error when “git push” to github I tried to push my new branch (let's just call it new_branch ) to remote rep. There is no such branch there yet, but git push origin new_branch:new_branch should create it. When I try to do it, this is what I get: error: src refspec new_branch does not match any. error: failed to push some refs to 'ssh://git@***' I dug through million of questions like this on SO, but none of them specified these two errors at once and they referred only to master branch (I

Why do I get error: RPC failed; result=52, HTTP code = 0 fatal: The remote end hung up unexpectedly when pushing to github?

主宰稳场 提交于 2019-12-03 08:37:40
问题 I created a new repository on github and wanted to push some files. So I initialize the repository like normal and do git add . to add the current directory (which is my java project folder with bin and src folder inside). Then I added the remote directory using: git remote add https://github.com/username/project.git Then I made my first commit git commit -m "First Commit" then I type git push -u origin master and I get this error: Counting objects: 63, done. Delta compression using up to 4

How to create a new remote branch with EGit?

牧云@^-^@ 提交于 2019-12-03 06:04:37
Let's say I have an Eclipse Project which uses versioning control with EGit and is connected with a remote repository git@myrepo.com:git2013 . In my project, under the local branch newstuff , I create and change some files. Now, I want to push this to a remote branch named newstuff in my remote repository. But my remote repository only holds a branch master . How do I create a new remote branch called newstuff ? PS: Please do not answer with command-line git commands; describe how to do it in EGit. VonC You can follow the section " Configuring upstream push " in order to push a given branch:

git remote prune origin does not delete the local branch even if its upstream remote branch is deleted

╄→гoц情女王★ 提交于 2019-12-03 05:49:14
This is a common use-case for me, I clone a repository, checkout a branch, do some code changes, make multiple commits, then when its stable, i do a push to remote, eventually the branch gets merged and deleted. and I'm left with a local branch with upstream gone. I was looking for a safe way of deleting all such branches. from the description, it seemed like git remote prune origin is doing this exactly. But it doesn't seem to be working for me. Seeing the following behaviour, the branch encrdb_init has been deleted from remote but the git remote prune origin command does not seem to prune it

Is there any reason to not set 'git fetch' to always use the --prune option?

天大地大妈咪最大 提交于 2019-12-03 05:45:58
Using git fetch --prune deletes local remote tracking branches when the branch on the remote machine has been deleted. Setting remote.origin.prune to true using the following... git config --global fetch.prune true ...makes using the fetch command always implicitly use the --prune option. I am putting together a best-practices/introduction to git for some developers in my group who aren't quite familiar with it. I want to be sure I know this is not a dangerous behavior before advising them to do so. I at least give them a heads up of what to watch out for if there is some extraneous mishap

How can I tell which remote “parent” branch my branch is based on?

ぐ巨炮叔叔 提交于 2019-12-03 03:37:45
问题 I have a scenario in which there a several remote tracking branches within my local repository that I must sync up to. Our workflow model is: make a branch locally, based off of the desired remote tracking branch make our changes build/test/fix commit push back to the remote server I've noticed that "git status" doesn't show me what branch my local branch is based on unless something has changed; i.e. uncommitted local changes or a recent fetch puts my local branch behind the times. Is there

Why does Git tell me “No such remote 'origin'” when I try to push to origin?

痴心易碎 提交于 2019-12-03 01:48:56
问题 I am very new to Git; I only recently created a GitHub account. I've just tried to push my very first repository (a sample project), but I'm getting the following error: No such remote 'origin' I ran the following commands: git init git commit -m "first commit" git remote add origin https://github.com/VijayNew/NewExample.git git push -u origin master However, when I ran git commit -m "first commit", I got the following message: nothing added to commit but untracked files present (use "git add

How do I add a remote Git repository to an Ubuntu Server?

a 夏天 提交于 2019-12-03 01:02:31
问题 I have created a Git repository on my Desktop machine (Windows 7) with: git init git add <all my files> git commit -m "added my files" Now I have installed a new Ubuntu Server 10.10 on a machine on my LAN and installed OpenSSH. My home directory is /home/jonas and I created a directory ~/code/ to contain my projects. I can log in to the Ubuntu Server from Windows 7 with Putty. I installed Git on the server with sudo apt-get install git Adding a remote repository Now I want to add my Git