git

git - new user trying to do pull and getting some confusing messages

空扰寡人 提交于 2021-02-15 08:12:34
问题 I am pretty new to git. I have been primarily checking stuff into a repository, but now I want to get the latest changes from another developer. I tried to simply do a command like git pull something ran, but it came back with a message like this: There is no tracking information for the current branch. Please specify which branch you want to merge with. See git-pull(1) for details git pull <remote> <branch> If you wish to set tracking information for this branch you can do so with: git

git - new user trying to do pull and getting some confusing messages

浪尽此生 提交于 2021-02-15 08:10:29
问题 I am pretty new to git. I have been primarily checking stuff into a repository, but now I want to get the latest changes from another developer. I tried to simply do a command like git pull something ran, but it came back with a message like this: There is no tracking information for the current branch. Please specify which branch you want to merge with. See git-pull(1) for details git pull <remote> <branch> If you wish to set tracking information for this branch you can do so with: git

How to recover from git “deleted by us” conflict during rebase after file had been renamed (but git treated as a deletion)

╄→гoц情女王★ 提交于 2021-02-15 07:55:31
问题 My git repo has 2 branches: 'develop' and 'feature'. When I run git rebase develop , I see: First, rewinding head to replay your work on top of it... Applying: inital commit Using index info to reconstruct a base tree... A datastore/static/js/app/main.js Falling back to patching base and 3-way merge... CONFLICT (modify/delete): datastore/static/js/app/main.js deleted in HEAD and modified in inital commit. Version inital commit of datastore/static/js/app/main.js left in tree. error: Failed to

How to recover from git “deleted by us” conflict during rebase after file had been renamed (but git treated as a deletion)

时间秒杀一切 提交于 2021-02-15 07:55:13
问题 My git repo has 2 branches: 'develop' and 'feature'. When I run git rebase develop , I see: First, rewinding head to replay your work on top of it... Applying: inital commit Using index info to reconstruct a base tree... A datastore/static/js/app/main.js Falling back to patching base and 3-way merge... CONFLICT (modify/delete): datastore/static/js/app/main.js deleted in HEAD and modified in inital commit. Version inital commit of datastore/static/js/app/main.js left in tree. error: Failed to

PowerShell渗透--Empire

依然范特西╮ 提交于 2021-02-15 07:33:56
0x00 简介 Empire是一款针对Windows平台的,使用PowerShell脚本作为攻击载荷的渗透攻击框架代码具有从stager生成,提权到渗透维持的一系列功能,无需powershell.exe就可以使用powershell的代理功能还可以快速在后期部署漏洞利用模块,内置模块有键盘记录,Mimikatz,绕过UAC,内网扫描等,可以躲避网络检测和大部分安全防护工具,类似于Meterpreter,是一个基于PowerShell的远控木马( www.powershellempire.com ) 0x02 安装 git clone https://github.com/EmpireProject/Empire.git 0x03 使用 help 查看帮助 设置监听 listeners #进入监听线程界面 uselistener #设置监听模式 info #查看具体参数设置 set #设置相应参数 execute #开始监听 uselistener 用来设置监听模式 uselistener <tab> <tab> 查看可以使用的监听模式 uselistener http 采用http监听模式,输入info 查看具体参数设置 Required 为 true 的参数都是需要设置的 set Name Micr067 #设置任务名称 set Host 192.168.190.133 #

Windows 命令行终端 PowerShell 美化计划

▼魔方 西西 提交于 2021-02-15 06:23:07
1. 前言 欢迎加入[ 微信圈子 ] 程序员交流圈 交流编程经验。 作为一个程序员,终端工具是必不可少的。但是 「Windows」 的默认终端实在太丑了,作为一个颜控忍不了。所以必须实施终端改造计划。目前我们都会使用 「PowerShell」 ,所以改造计划就先从它开始。先看看我改造的效果: ❝ 本文涉及的所有命令都在 「管理员模式」 的 「PowerShell」 下执行。 ❞ 2. 安装 Chocolatey 「homebrew」 很多使用 「Mac」 的同学都用过,很方便的软件包管理工具。一行命令就可以安装很多我们需要的开发软件,比如 「Maven」 、 「JDK」 等,命令非常简单,比如我们从软件仓库查找一下 「JDK」 : 安装 「Chocolatey」 的命令为: Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; iwr https://chocolatey.org/install.ps1 -UseBasicParsing | iex 3. 改造字体 第一步就是改造字体,默认的 「新宋体」

git笔记十:本地仓库同步到gitlab

只愿长相守 提交于 2021-02-15 06:01:22
本地仓库同步到gitlab 帮助文档 git remote --help 操作场景: 本地创建git仓库(含有readme.md文件), commit了三次 gitlab网站创建了一个项目 添加了readme.md 文件 再本地添加 远程关联 push到gitlab 1:添加远程分支的关联 git remote add gitlab git@git.demo123.com:dotnet/basics/gitstudy.git 2: 拉取到本地来吧 git fetch gitlab 因为本地和远程的readme.md 文件没有做合并, 我们现在来 merge一下 soaeon@DESKTOP-FUJJTHR MINGW64 /f/gitstudy (master) $ git merge gitlab/master fatal: refusing to merge unrelated histories 将两个不相干的文件 merge一下 soaeon@DESKTOP-FUJJTHR MINGW64 /f/gitstudy (master) $ git merge --allow-unrelated-histories gitlab/master 结果如下: Merge remote-tracking branch 'gitlab/master' # Please enter a

git忽略未被跟踪和已被跟踪的文件

独自空忆成欢 提交于 2021-02-15 05:06:41
git的文件操作本质上来讲是基于文件索引来做追踪的。 至于忽略未跟踪(untrack)文件文件,git提供了三种方式 1 .gitignore 2 git config --global core.excludesfile 3 git/info/exclude 网上有很多参考资料,可自行查阅。 不同语言项目大致需要忽略的文件,也已有大量现成模板。 至于如何忽略已跟踪(tracked)文件,使得当本地某系文件(尤其是配置文件发生改变时,不需要体现在git变化列表中)有以下两种方式: 1.git update-index --assume-unchanged /path/file 与git update-index --no-assume-unchanged /path/file 2.git update-index --skip-worktree /path/file 与git update-index --no-skip-worktree /path/file 此时再对/path/file进行更改,你会发现不会体现在git status列表中 有很多文章介绍采取git rm --cache的方式,不可取,这种方法本质上是将所有文件都删除了 参考: https://my.oschina.net/zmf/blog/501207 https://my.oschina.net

GIT关联并同步远程仓库和本地仓库

ぐ巨炮叔叔 提交于 2021-02-15 04:50:52
一、创建远程仓库 这是初始状态,远程仓库已经创建了一些文件了 二、创建本地仓库 先在本地创建一个空文件夹(可以作为工作空间),然后cmd进入这个文件夹执行git init 接着,可以在这个工作空间中创建若干项目,比如我用IDEA创建一个C++项目, 注意最好在工作空间的子目录中创建项目,这样就能创建多个项目互不干扰,又能在同一个git仓库中管理 比如我创建一个project1项目,项目根目录为 C:\03_WorkSpace\test_ws\project1, 在新建项目中新建一些文件,比如我创建了一个跟远程仓库同名的文件 README.md,这样能演示同步问题 三、修改git管理的本地文件版本状态 先查看一下目前本地仓库情况, 上图中README.md文件状态有两项,一项是changes to be committed,因为前面新建了这个文件还没提交,此时可以提交。 另一项是not staged状态,因为新建这个文件后修改了内容,可以使用git add转为staged以便提交,或者用git checkout放弃修改。若直接提交这个文件的话,修改的内容将不会提交。 最下面是还没有纳入版本库管理的文件,可以用git add加入版本管理。 关于GIT文件的状态转换,可参考 https://git-scm.com/book/zh/v2/Git-%E5%9F%BA%E7%A1%80-%E8