I'm new to git. I am struggling hard while looking at "Introduction to git" of "Dot Installation" and crawling.Environment
Local: Mac OSX 1.13.6
Server: xrea plus
What i am doing
/virtual/(userneme) ├── git │ └── some.web.site └── public_html └── some.web.site └── .git (local) / path/to/MAMP └── htdocs └── some.web.site └── .git
Make notes while watching the web and say this? I'm hitting the command without understanding half, but I get an error and it ends up unsuccessfully.
Although there was a time when I went well, I can't fix my symptoms after the error came out.
- First, make a
From here, it will be
sshwork on the server for a while.
$mkdir -p ~/git/some.web.site $cd ~/git/some.web.site $git init --bare
Edit the file
#!/usr/bin/bash cd ~/public_html/some.web.site git --git = dir = .git pull origin master: master
$cd hooks / $chmod + x post-receive $cd ~/public_html/some.wev.site $git init Initialized empty Git repository in /virtual/(username)/public_html/some.web.site/.git/ $git remote add origin ~/git/some.web.site
There is no error so far.
From here it is local.
$cd /path/to/MAMP/htdocs/some.web.site $git clone ssh: // (username) @ (servername) .xrea.com: 22/virtual/(username) /git/some.web.site/ ... (* 1) Cloning into 'some.web.site' ... (username) @ (servername) .xrea.com's password: warning: You appear to have cloned an empty repository. $git push origin master: master ... (* 2) fatal: 'origin' does not appear to be a git repository fatal: Could not read from remote repository. Please make sure you have the correct access rights and the repository exists.
(* 1) I understand somehow doing something strange.
I understand that there is an empty repository on the server and it is strange to try to pull it from there.
However, I don't know what to do.
I think that (* 2) doesn't work well if (* 1) solves it.
(* 1) is wrong, please tell me how to fix it or whether it is wrong in the first place.Update 2018.8.22 (wed) 19:53 I omitted
(* 1) and did
git remote, but the specification method is probably wrong and an error occurs.
$git remote add origin (username) @ (servername) .xrea.com: (username) /git/some.web.site ... (* 3)
fatal: The current branch master has no upstream branch. To push the current branch and set the remote as upstream, use git push --set-upstream origin master
As I said,
$git push --set-upstream origin master
error: src refspec master does not match any. error: failed to push some refs to '(username) @ (servername) .xrea.com: (username) /git/some.web.site'
I'm imagining that
I get angry.
(* 3) is wrong, how can I fix it?
Answer # 1
$git push -u origin master
You will be asked for your remote server password,
You can now go with just
Answer # 2
* 1 work is unnecessary.
The repository created on the server side is a remote repository set as origin and is empty.
There is nothing to clone.
As local work
Set origin with git remote
git pushIsn't it working in the order of
Maybe you are editing a .hook of the server side repository, so you might get an error in push ... (← out of knowledge)
In that case, you should recreate the repository with --bare again, push it, and edit the .hook.
- git - how to update the non-bear repository
- how to delete commits in local repository with git
- i want to link the repository created in the terminal with atom's git
- i want to update my branch remotely with git
- centos - when yum update is performed, the error repository epel is listed more than once in the configuration
- i am a git beginner git remote repository disappears there is a local repository can you give me some advice or tips on how to r
- git - is it possible to manage the repository created on the rental server with gui like sourcetree?
- pushing to a repository created with gitlab fails with an error
- if you commit to svn, git, i want to update the version described in the source file automatically
- git - pushing to the remote repository fails
- python - i want to get only update information of selenium website
- git - connected to repository, but unable to connect with exit code 128 (not found)
- SVN command to update website method in PHP
- Create a repository with git
- Git remote repository
- when i try to push with gitlab, i can't push fatal: unable to update url base from redirection:
- about intellij github repository creation
- git - i want to push the newly recreated local repository to the remote repository i created once
- github - the git repository has been published
- to update changes with git (heroku)
- python 3x - typeerror: 'method' object is not subscriptable
- python - you may need to restart the kernel to use updated packages error
- xcode - pod install [!] no `podfile 'found in the project directory
- vuejs - [vuetify] unable to locate target [data-app] i want to unit test to avoid warning
- android studio - emulator: dsound: could not initialize about the error message directsoundcapture
- android studio - unresolved reference comes out in kotlin
- mysql startup failed [error] innodb: the innodb_system data file 'ibdata1' must be writable
- django - oserror: [winerror 123] the file name, directory name, or volume label syntax is incorrect : '<frozen importlib_boot
- python - importerror: cannot import name md5 error cannot be resolved