git-remote

How do I use git without having a proper git server?

不羁岁月 提交于 2020-06-26 14:52:29
问题 I want to be able to make backups of my project in a windows environment without having to manually copy and paste my whole folder. Unfortunately I am not allowed to use a remote git server for this project, so I was wondering if I could use git for backing up my project on a mounted hard drive. I have tried this solution: git remote add Y file:///path/to/Y However, when I try to push I receive this error: fatal: Could not read from remote repository. Please make sure you have the correct

How do I use git without having a proper git server?

我与影子孤独终老i 提交于 2020-06-26 14:52:08
问题 I want to be able to make backups of my project in a windows environment without having to manually copy and paste my whole folder. Unfortunately I am not allowed to use a remote git server for this project, so I was wondering if I could use git for backing up my project on a mounted hard drive. I have tried this solution: git remote add Y file:///path/to/Y However, when I try to push I receive this error: fatal: Could not read from remote repository. Please make sure you have the correct

GIT: with CRA app in your rootfolder, how can I push to git correctly?

混江龙づ霸主 提交于 2020-06-26 14:41:27
问题 I am quite new to git. it might be a stupid question but I really don't know how to solve this problem.. I have been trying to find the answer but I couldn't... I was trying to create my project using React.js and Node.js. I created my sever.js and client folder that is created from 'npx create-react-app client'. when I first pushed to git, I had this error message. ! [rejected] master -> master (fetch first) error: failed to push some refs hint: Updates were rejected because the remote

“git remote show origin”: why all branches show “tracked” even when some aren't?

旧街凉风 提交于 2020-06-22 12:22:11
问题 Why does "git remote show origin" list remote branches as "tracked" even when those branches are not linked to a local branch for pull/push? Does "tracked" mean something else in this context? I thought that was the whole meaning of "tracked": git docs on branch tracking. 1) clone a repo with more than one remote branch 2) run git remote show origin -- says "testBranch" is tracked. But git branch -vv correctly shows only master tracking origin/master, and git branch -a correctly shows that

How can I check write access to a remote Git repository (“can I push?”)

有些话、适合烂在心里 提交于 2020-05-09 18:06:31
问题 I am building a (somewhat limited) Git client. To set up a repository, you enter the URL to the remote repo. I want to check whether the user has read+write access to that repository. If not, I present an authentication dialog. I check 'read' access with git ls-remote <url> . Is there an analogous way to check 'write' access , without cloning the repo first? (I know I could git clone <url> and then git push --dry-run ) 回答1: If the git repo is in github, open any file in the repo, then click

How to create a new remote branch with EGit?

試著忘記壹切 提交于 2020-01-22 11:07:22
问题 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

git pull command output message meaning into which branch

我的未来我决定 提交于 2020-01-21 05:43:31
问题 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

Git: Use two branches with same name from different remotes

試著忘記壹切 提交于 2020-01-16 03:58:10
问题 I'm using a repository which exists both on github and on an internal gitlab. I have set up two remotes: origin (github) and gitlab . How can I easily interact with the branch master of both remotes? What I've tried: git checkout --track gitlab/master -> error: A branch named 'master' already exists. git checkout -b master-gitlab --track gitlab/master -> worked, I now have a local branch master-gitlab and the console output tells me: master-gitlab set up to track remote branch master from