git push和github的问题

时间:2018-07-27 05:28:31

标签: git github

我正在尝试git push,但出现以下错误:

if(isset($_POST["from_date"], $_POST["to_date"])){

 $fdate = $_POST["from_date"];
$todate = $_POST["to_date"];

$stmt = $conn->prepare("select vendor_id,date,total,pay,due,payment_type from purs where date BETWEEN '" . $_POST["from_date"] . "' AND '" . $_POST["to_date"] . "' ");
$stmt->bind_result($vendor_id, $date, $total, $pay, $due, $payment_type);

if ($stmt->execute()) {
    while ($stmt->fetch()) {
        $output[] = array("vendor_id" => $vendor_id, "date" => $date, "total" => $total, "pay" => $pay, "due" => $due, "payment_type" => $payment_type);
    }

    echo json_encode($output);
}
$stmt->close();

所以我输入:

fatal: No configured push destination.
Either specify the URL from the command-line or 
configure a remote repository using

git remote add <name> <url>

and then push using the remote name

git push <name>

我明白了:

git push https://github.com/everest- 
software/everest-web.git

输入后,我得到了:

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 
https://github.com/everest-software/everest- 
web.git master

我该怎么办?

1 个答案:

答案 0 :(得分:1)

是的,它表明您当前的分支位于master分支之后。因此,您需要先进行git pull才能使您的分支与master分支处于同一水平。