admin管理员组

文章数量:1635839

一、使用git命令将项目下载到本地

git init 

git push https://github.com/Gaojunlong/3y.git (远程仓库)

更改之后push的时候出现问题

$ git push
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 remote:git remote用法

    # 查看关联的远程仓库的名称
    git remote
    
    # 查看关联的远程仓库的详细信息
    git remote -v
    
    # git_url 为你的远程仓库的 url,可采用 http 协议或 ssh(git) 协议
    git remote add origin <url>
    
    # 删除关联的远程仓库
    git remote remove <name>
    
    # 添加新的远程仓库关联
    git remote add <name> <url>

二、第一次使用push的时候需要进行配置

第一次push时需要网址
 
 git add --all  或者使用 git add .(所得的文件) | git add file.js(对用指定文件)

 git commit -m "提交信息"

 git remote add origin '远程仓库url'

 git push -u origin origin(对应远程分支名)

在下次使用的时候,直接输入以下命令即可

 git add --all  | git add .(所得的文件) | git add file.js(对用指定文件)

 git commit -m "信息"

 git push

%%%%%%%%以上为git的踩坑总结%%%%%%%%%%

本文标签: FATALGitconfigureddestinationpush