git push 推送至远程仓库发生报错

git push origin master
To https://gitee.com//hello-git.git
! [rejected] master -> master (fetch first)
error: failed to push some refs to 'https://gitee.com/
/hello-git.git’
hint: Updates were rejected because the remote contains work that you do
hint: not have locally. This is usually caused by another repository pushing
hint: to the same ref. You may want to first integrate the remote changes
hint: (e.g., ‘git pull …’) before pushing again.
hint: See the ‘Note about fast-forwards’ in ‘git push --help’ for details.

这个错误是因为你本地的仓库与远程仓库中的内容不同步,需要先拉取远程仓库的最新代码合并到本地仓库再进行 push 操作。你可以运行以下命令来解决该问题:

git pull origin master --allow-unrelated-histories
该命令将从远程仓库拉取最新代码并合并到本地仓库中。如果出现冲突,需要手动解决冲突后再进行提交。

然后再运行 git push origin master 命令即可将本地代码推送到远程仓库。

  • 2
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论
Android, the next-generation open mobile platform from Google and the Open Handset Alliance, is poised to become a significant player in the mobile device market. The Android platform gives developers a fair bit of control while still supporting a familiar programming language. However, the frameworks, GUI widgets, and development model is different than any other mobile platform out there. That’s where this book comes in Spanning 466 pages, The Busy Coder’s Guide to Android Development covers a wide range of Android capabilities and APIs, from creating simple user interfaces, to supporting long-running background processes, through the advanced location tracking and mapping features. Along the way, it covers how to embed the WebKit Web browser in your application, how to have your application use data from other installed applications (and vice versa!) or off the Internet, and how to integrate with the built-in on-device search engine. It will help you more quickly climb the Android learning curve, so you can create the “killer app” you’ve dreamed of…or perhaps just a quick-and-dirty application for you and your friends. Table of Contents Preface Key Android Concepts Choosing Your Development Toolchain Tutorial #1 - Installing the Tools Android and Projects Tutorial #2 - Creating a Stub Project Getting Around Android Studio Contents of Android Projects Introducing Gradle and the Manifest Tutorial #3 - Changing Our Manifest (and Gradle File) Some Words About Resources Tutorial #4 - Adjusting Our Resources The Theory of Widgets The Android User Interface Basic Widgets Debugging Your App LinearLayout and the Box Model Other Common Widgets and Containers Tutorial #5 - Making Progress GUI Building, Continued AdapterViews and Adapters The WebView Widget Defining and Using Styles JARs and Library Projects Tutorial #6 - Adding a Library The Action Bar Tutorial #7 - Setting Up the Action Bar Android’s Process Model Activities and Their Lifecycles Tutorial #8 - Setting Up An Activity The Tactics of Fragments Tutorial #9 - Starting Our Fragments Swiping with ViewPager Tutorial #10 - Rigging Up a ViewPager Resource Sets and Configurations Material Design Basics Dealing with Threads Requesting Permissions Tutorial: Runtime Permission Support Assets, Files, and Data Parsing Tutorial #11 - Adding Simple Content Tutorial #12 - Displaying the Book Using Preferences Tutorial #13 - Using Some Preferences SQLite Databases Tutorial #14 - Saving Notes Internet Access Intents, Intent Filters Broadcasts and Broadcast Receivers Tutorial #15 - Sharing Your Notes Services and the Command Pattern Tutorial #16 - Updating the Book Large-Screen Strategies and Tactics Tutorial #17 - Supporting Large Screens Backwards Compatibility Strategies and Tactics System Services Google Play Services Getting Help Working with Library Projects Gradle and Legacy Projects Gradle and Tasks Gradle and the New Project Structure Gradle and Dependencies Manifest Merger Rules Signing Your App Distribution Advanced Gradle for Android Tips Testing with JUnit4 Testing with UI Automator Measuring Test Coverage Unit Testing MonkeyRunner and the Test Monkey Notifications Advanced Notifications Introducing GridLayout The Percent Support Library Dialogs and DialogFragments Advanced ListViews Action Bar Navigation Action Modes Other Advanced Action Bar Techniques Toolbar AppCompat: The Official Action Bar Backport RecyclerView Implementing a Navigation Drawer The Android Design Support Library Advanced Uses of WebView The Input Method Framework Fonts Rich Text Animators Legacy Animations Custom Drawables Mapping with Maps V2 Crafting Your Own Views Advanced Preferences Custom Dialogs and Preferences Progress Indicators More Fun with Pagers Focus Management and Accessibility Miscellaneous UI Tricks Event Bus Alternatives Tasks The Assist API (“Now On Tap”) The Data Binding Framework Desktop Android Apps Drag and Drop Keyboard and Mouse Input Home Screen App Widgets Adapter-Based App Widgets Content Provider Theory Content Provider Implementation Patterns The Loader Framework The ContactsContract and CallLog Providers The CalendarContract Provider The MediaStore Provider Consuming Documents Providing Documents Encrypted Storage Packaging and Distributing Data Advanced Database Techniques Data Backup SSL NetCipher Embedding a Web Server Miscellaneous Network Capabilities Audio Playback Audio Recording Video Playback Using the Camera via 3rd-Party Apps Working Directly with the Camera Media Routes Supporting External Displays Google Cast and Chromecast The “Ten-Foot UI” Putting the TVs All Together: Decktastic Creating a MediaRouteProvider Screenshots and Screen Recordings Advanced Permissions Restricted Profiles and UserManager Miscellaneous Security Techniques AlarmManager and the Scheduled Service Pattern PowerManager and WakeLocks JobScheduler Accessing Location-Based Services The Fused Location Provider Working with the Clipboard Telephony Working With SMS NFC Device Administration Basic Use of Sensors Printing and Document Generation Dealing with Different Hardware Writing and Using Parcelables Responding to URLs Plugin Patterns PackageManager Tricks Remote Services and the Binding Pattern Advanced Manifest Tips Miscellaneous Integration Tips Reusable Components Android Studio Editors and Dialogs Advanced Emulator Capabilities Lint and the Support Annotations Using Hierarchy View Screenshots and Screencasts ADB Tips and Tricks Issues with Speed Finding CPU Bottlenecks Focus On: NDK Improving CPU Performance in Java Finding and Eliminating Jank Issues with Bandwidth Focus On: TrafficStats Measuring Bandwidth Consumption Being Smarter About Bandwidth Issues with Application Heap Finding Memory Leaks Issues with System RAM Issues with Battery Life Power Measurement Options Sources of Power Drain Addressing Application Size Issues The Role of Scripting Languages The Scripting Layer for Android JVM Scripting Languages Crash Reporting Using ACRA In-App Diagnostics Anti-Patterns Widget Catalog: AdapterViewFlipper Widget Catalog: CalendarView Widget Catalog: DatePicker Widget Catalog: ExpandableListView Widget Catalog: SeekBar Widget Catalog: SlidingDrawer Widget Catalog: StackView Widget Catalog: TabHost and TabWidget Widget Catalog: TimePicker Widget Catalog: ViewFlipper Chrome and Chrome OS Device Catalog: Kindle Fire Device Catalog: BlackBerry Device Catalog: Android TV Device Catalog: Amazon Fire TV and Fire TV Stick Appendix A: CWAC Libraries Appendix B: N Developer Preview Appendix C: Community Theater and the Appinars Title: The Busy Coder’s Guide to Android Development Author: Mark L. Murphy Length: 3893 pages Edition: Revised & enlarged Language: English Publisher: CommonsWare Publication Date: 2016-06-06 ISBN-10: 0981678009 ISBN-13: 9780981678009

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

陈毓辰

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值