git拒绝推送非快进(git rejected push non-fast-forward)
我对git很陌生,在过去的2个月里我一直在做一个小型项目,并且一直在推动没有问题的bitbucket。 几天前,我压缩了我的项目文件夹(因为我不得不重新安装我的Linux操作系统),现在在重新安装Linux操作系统后将其解压缩。
所以,现在,我去了我的项目文件夹,开心地工作,最终做到了:
git add -A && git commit -m "modified code" && git push origin master
..这是我通常做的..
我得到:
To https://johnsproject@bitbucket.org/johnsproject/proj.git ! [rejected] master -> master (non-fast-forward) error: failed to push some refs to 'https://johnsproject@bitbucket.org/johnsproject/proj.git' hint: Updates were rejected because the tip of your current branch is behind hint: its remote counterpart. Merge the remote changes (e.g. 'git pull') hint: before pushing again. hint: See the 'Note about fast-forwards' in 'git push --help' for details.
我看过几个SO问题,他们建议使用强制标志
-f
,但我不确定我是否应该这样做。ps:我在主分支 - 这是我回购的
only
分支。如果有人能在这里指出我正确的方向,我会很感激。
谢谢。
I am quite new to git, and I had been working on a small side project for the last 2 months and had been pushing stuff onto bitbucket with no problems. A couple of days ago, I zipped my project folder (since I had to reinstall my Linux OS) and now unzipped this after my reinstallation of Linux OS.
So, now, I went to my project folder, kept happily working and finally did:
git add -A && git commit -m "modified code" && git push origin master
..which is what I usually do..
and I get:
To https://johnsproject@bitbucket.org/johnsproject/proj.git ! [rejected] master -> master (non-fast-forward) error: failed to push some refs to 'https://johnsproject@bitbucket.org/johnsproject/proj.git' hint: Updates were rejected because the tip of your current branch is behind hint: its remote counterpart. Merge the remote changes (e.g. 'git pull') hint: before pushing again. hint: See the 'Note about fast-forwards' in 'git push --help' for details.
I have had a look at a few SO questions where they suggest the use of a force flag
-f
- but I am unsure if I should be doing this.p.s: I am on the master branch - which is the
only
branch on my repo.Would really appreciate if anyone could point me in the right direction here.
Thanks.
原文:https://stackoverflow.com/questions/16899243
最满意答案
对于SQL Server所有者,您应该能够使用:
select suser_sname(owner_sid) as 'Owner', state_desc, * from sys.databases
有关SQL用户的列表:
select * from master.sys.server_principals
For the SQL Server Owner, you should be able to use:
select suser_sname(owner_sid) as 'Owner', state_desc, * from sys.databases
For a list of SQL Users:
select * from master.sys.server_principals
Ref. SQL Server Tip: How to find the owner of a database through T-SQL
相关问答
更多-
对于SQL Server所有者,您应该能够使用: select suser_sname(owner_sid) as 'Owner', state_desc, * from sys.databases 有关SQL用户的列表: select * from master.sys.server_principals 参考。 SQL Server提示:如何通过T-SQL查找数据库的所有者 如何测试SQL Server中是否存在用户? For the SQL Server Owner, you should be ...
-
如何从现有数据库中获取identityServer4的用户(How to get users from a existing database for identityServer4)[2022-02-14]
本文与您的情况更相关。 您链接的是配置数据而不是用户数据: http : //docs.identityserver.io/en/release/quickstarts/6_aspnet_identity.html 简而言之,您希望通过Asp.Net Core Identity访问您的用户数据。 你需要: 创建一个包含相关字段作为数据库的用户类 创建一个EntityFramework DbContext类,将数据库映射到您的类 使用aspnet核心标识注册您的用户类和dbcontext 告诉Identity ... -
从数据库Firebase获取用户(Get users from db Firebase)[2023-07-17]
在对用户进行身份验证之后,如果您想将其他用户添加到Firebase数据库,则可以这样做: var uid = firebase.auth().currentUser.uid; firebase.database().ref("users").child(uid).set({ username: name, email: email //some more user data }); 那么你将在db中拥有这个: users useruid username: userx email: u ... -
你可以使用IN()MySQL方法,即 SELECT username,email,etc FROM user_table WHERE userid IN (1,15,36,105) 这将返回userid与这些ID匹配的所有行。 你添加的ID越多,效率越低,但你提到的10左右应该没问题。 You could use the IN() MySQL method, i.e. SELECT username,email,etc FROM user_table WHERE userid IN (1,15,36,10 ...
-
跟踪列表数据库(Tracking List Database)[2023-04-12]
如果我理解正确,你有一个用户列表和电影列表。 每个用户可以评价电影。 所以在这种情况下,我会创建一个具有以下结构的新表movie_rating: | movie_id | user_id | 评级| 等等 要存储观看的电影:创建表watched_movies | movie_id | user_id | 等等 如果有很多用户,这肯定会创建大量的记录。 但不要担心MySQL不是那么糟糕:) if i understand you correctly, you have a list of users and ... -
这是我在表单上使用的内容(根据您的条款进行了修改)。 mysql_connect('localhost', 'root', '123'); mysql_select_db('db1'); $sql = "SELECT type FROM users"; $result = mysql_query($sql) or die ("Error in query: $sql. " . mysql_error()); if (mysql_num_rows($result) > ...
-
Rails来自数据库的用户列表(Rails user list from database)[2023-11-16]
所有这些错误消息都表明@user在您的视图中为零。 假设视图是views / users / index.html.erb,您是否在这样的users_controller索引操作中初始化了@users? def index @users = User.all end All this error messages indicate that @user is nil in your view. Assuming the view is views/users/index.html.erb, have ... -
显示我的数据库中的用户列表(Show list of users in my database)[2024-02-14]
尝试这个: $dbh = new PDO('mysql:host=localhost;dbname=test;charset=utf8mb4', 'root', ''); $dbh->setAttribute(PDO::ATTR_DEFAULT_FETCH_MODE, PDO::FETCH_OBJ); $sqlget = "SELECT * FROM user"; $sqldata = $dbh->query($sqlget) or die('error users'); echo "