惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Apple Machine Learning Research
Apple Machine Learning Research
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
G
Google Developers Blog
博客园 - 司徒正美
J
Java Code Geeks
aimingoo的专栏
aimingoo的专栏
A
About on SuperTechFans
博客园 - 三生石上(FineUI控件)
WordPress大学
WordPress大学
T
The Blog of Author Tim Ferriss
D
Docker
大猫的无限游戏
大猫的无限游戏
D
DataBreaches.Net
腾讯CDC
V
Visual Studio Blog
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
C
Check Point Blog
M
MIT News - Artificial intelligence
Jina AI
Jina AI
I
InfoQ
雷峰网
雷峰网
The Cloudflare Blog
美团技术团队
Engineering at Meta
Engineering at Meta

博客园 - π三毛

Hyperledge 开发环境配置常见问题 SQL Server 2012日志文件误删除数据库质疑后的相关恢复 go read text file into string array mac boot2docker certs not valid with 1.7 T-SQL 比较N个指段取其中最大值 如何定位Sharepoint网站集所在的w3wp进程 node常用包 Google analytics Offline Installation the .NET Framework 3.5 on Windows 8 [MSDN]How to use the computer keyboard with Windows Phone Emulator Managing SharePoint 2010 Farm Solutions with Windows PowerShell turning on full error Messages [转]vi使用方法 转帖-在oracle中自动大批量生成测试数据 删除大恒文档加密客户端 Terminating the Session with ALTER SYSTEM Oracle RMAN vs. Export? 错误14274:无法添加、更新或删除从msx服务器上发起的作业(或其步骤或调度) MS SQL SERVER 2000 同步计算机名称
xcode-git笔记
π三毛 · 2015-01-25 · via 博客园 - π三毛

git init
git add .
vi .gitignore /*将代码区蓝色字体的内容*/
git commit -m "初次建立"
git remote add origin https://github.com/User/Qioa1.git
git push -u origin master
git push -u origin --all


#.gitignore中的内容
# Xcode
*/build/*
*.pbxuser
!default.pbxuser
*.mode1v3
!default.mode1v3
*.mode2v3
!default.mode2v3
*.perspectivev3
!default.perspectivev3
!default.xcworkspace
xcuserdata
profile
*.moved-aside
.DS_Store
*.svn/
*.idea/


1.删除仓库中跟踪的UserInterfaceState.xcuserstate
git rm --cached /Users/kyo/Documents/IOS\ Development/protect/Git/JuMi/JuMi.xcodeproj/project.xcworkspace/xcuserdata/kyo.xcuserdatad/UserInterfaceState.xcuserstate
git commit -m "Removed file that shouldn't be tracked"
git push

find . -name .DS_Store -print0 | xargs -0 git rm -f --ignore-unmatch


原文地址:http://www.xuebuyuan.com/1933454.html

git本地有修改如何强制更新
本地有修改和提交,如何强制用远程的库更新更新。我尝试过用git pull -f,总是提示 You have not concluded your merge. (MERGE_HEAD exists)。

我需要放弃本地的修改,用远程的库的内容就可以,应该如何做?傻傻地办法就是用心的目录重新clone一个,正确的做法是什么?

正确的做法应该是:

git fetch --all
git reset --hard origin/master
git fetch 只是下载远程的库的内容,不做任何的合并git reset 把HEAD指向刚刚下载的最新的版本

参考链接:

http://stackoverflow.com/questions/1125968/force-git-to-overwrite-local-files-on-pull