git-remote

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 00:06:00
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 threads. Compressing objects: 100% (60/60), done. Writing objects: 100% (62/62), 16.98 KiB, done. Total

Will remote URL for fetch and push be different?

≯℡__Kan透↙ 提交于 2019-12-02 20:19:10
git remote --v show remote info origin https://github.com/test/testing-iOS.git (fetch) origin https://github.com/test/testing-iOS.git (push) It shows that both fetch and push are using the same remote URL. Question: When will (if ever) remote URL for fetch and push be different? What commands can you use to change remote URL for fetch or push separately? VonC Yes (using different remote), and that is why Git 2.5 introduces a new ref shorthand @{push} . See " Viewing Unpushed Git Commits " What commands can you use to change remote URL for fetch or push separately? You need a separate remote:

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

大城市里の小女人 提交于 2019-12-02 17:04:15
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 some way of knowing what branch my local branch is based on without having to change things? Something

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

自古美人都是妖i 提交于 2019-12-02 14:22:49
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 repository on my Desktop to the Server. I tried to follow the instructions from Pragmatic Version Control

git delete remotes: remote refs do not exist

北城余情 提交于 2019-12-02 14:13:28
In short; How can I delete remote multiple merged remotes? More background; I have a git repo with tens of remotes which have been merged into master. I can delete these remotes one at a time by using: git push --delete origin myBranch-1234 However this is a slow and tedious process for all remotes. So I'm trying this command: git branch -r --merged | grep origin | grep -v master | xargs git push origin --delete git branch -r --merged lists all merged remotes. grep origin tells the command to include origin. grep -v master tells the command to exclude master. xargs git push origin --delete

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

天涯浪子 提交于 2019-12-02 14:05:47
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" to track) So then I tried to set origin , using git remote set-url origin https://github.com/VijayNew

How to know local repo is different from remote repo, without fetch?

霸气de小男生 提交于 2019-12-01 06:06:05
I got tens of repos, my script should update them if any difference happened, new commits, new tag, new branch. Fetch is kind of slow for tens of repos in my case, I'd like to know if there is any quick command could meet my requirement. mockinterface You can use the git ls-remote plumbing command to obtain the state of the remotes without fetch. Here, let’s use git itself as a lightweight database, to keep track of the state of the remote. Put the following in a script; you can enable it later as a git alias shell function for convenience. Run inside your repo. REMOTE_SUM=$(git ls-remote -

Git listing non-existent remotes

做~自己de王妃 提交于 2019-12-01 05:15:40
I recently made some changes to my remote repos in my Git repo config file. I renamed the remote names, changing my origin to another remote repo and renaming my old origin. For example, I had this previously: [remote "origin"] url = blah blah [remote "future"] url = blah blah I went in and changed them so they look like this: # formerly the origin [remote "old-origin"] # formerly the future repo [remote "origin'] But now, when I type git branch -a , I am seeing branches listed from the old 'future' remote: remotes/origin/HEAD remotes/origin/branch1 remotes/origin/branch2 remotes/future

How to know local repo is different from remote repo, without fetch?

六眼飞鱼酱① 提交于 2019-12-01 03:34:17
问题 I got tens of repos, my script should update them if any difference happened, new commits, new tag, new branch. Fetch is kind of slow for tens of repos in my case, I'd like to know if there is any quick command could meet my requirement. 回答1: You can use the git ls-remote plumbing command to obtain the state of the remotes without fetch. Here, let’s use git itself as a lightweight database, to keep track of the state of the remote. Put the following in a script; you can enable it later as a

git pull command output message meaning into which branch

扶醉桌前 提交于 2019-12-01 00:44:15
Say there is a remote branch br1 checkout on the remote repo, and the master branch on a local repo. Command 1: If I do a " git pull origin br1:br1 " it pulls remote br1 into local br1 , and shows: 9188a5d..97d4825 br1 -> br1 9188a5d..97d4825 br1 -> origin/br1 command 2: If I do just a " git pull ", it will pull remote br1 into local master , but it shows only the following: 9188a5d..97d4825 br1 -> origin/br1 I'm expecting it also shows something like " br1 -> master ". Why it does not show that? Does " br1 -> br1 " mean pulling remote br1 into local br1 ? What does that " br1 -> origin/br1 "