I can't find the answer anywhere...
I created a local branch from my master branch on my local repo.
Now, I want to push my branch to bitbucket (my master branch is already syncing fine)
How can I do that? (I don't have EGit, I can't download it for some reason)
with Git Bash do :
git push origin "your-name-of-branch"
This command push your origin (local branch) into remote "your-name-of-branch". If "your-name-of-branch" doesn't exist, create it
Related
My project leader has a remote git repo named repo-A. He created a new branch named branch-a and he has been working on a feature on this branch. He gave me a small task to do and I cloned this branch-a to my local repo. I created a new branch from branch-a named branch-b and made my changes in this. Now, How do I push it back as branch-b does not exist in the remote yet?
You need to push with set upstream option activated:
git push --set-upstream origin branch_b
On my local git repo, I used to push it to two different remote repo, one on github and another on heroku. Now my local is stuck on heroku repo and I want to create a branch from github master branch. How can I change from heroku to github(origin)?
[thi is what my terminal looks like]
See here - you want to set your local branch to track a different remote: Make an existing Git branch track a remote branch?
I have a movile project repo in bitbucket and I cloned that repo into a eclipse project the remote branch master/origin point too that repo this is ok, but I created another empty repo in bitbucket and I want to push my project in that empty repo.
My problem is that when I do git remote -v it shows the name of the branches of the repo from were I cloned the project, I want to remove those branches and change them to use the branches of the new empty repo that I created
You can change remote of the repo to point to a different URL:
git remote set-url origin git#bitbucket.org:<your_id>/<new_repo.git>
I finished coding a website in my local computer. Now need upload it to one branch github repo. like https://github.com/xxxx/test.git branch 001
Can you tell me how to commit it in the repo branch
I have already create a local repo commit all files into it by Netbeans. So How can i push the local repo to remote repo branch?
Thanks
When you locally create a branch Git automatically takes care of creating a new branch on the remote server. Just normally do
git push
It will create the branch on the remote server.
I git cloned a repo down to my local machine.
I forked that repo to my github account.
I made changes in my local files in sublime
I removed the original repo's origin because I want to push to my now forked repo
and then continue to alter my local files
when I do git diff you see the files I altered
when I do git remote -v I successfully see my forked repo
when I do git push -u origin master I get Everything is up to date but it isn't ...
and when I do git branch I am in my master branch.
You need to git commit, then push the new commit to your remote repository.
git diff compares the files on disk to what git is tracking; git push compares what git is tracking locally to the remote.